Part Number Hot Search : 
MN347H NCP15 GT4435PW 2SD2337 SPT7935 16080 MC68HC90 MB89997
Product Description
Full Text Search
 

To Download DSPIC33EV128GM002-ESO Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2013-2015 microchip technology inc. ds70005144d-page 1 dspic33evxxxgm00x/10x family operating conditions 4.5v to 5.5v, -40c to +85c, dc to 70 mips 4.5v to 5.5v, -40c to +125c, dc to 60 mips 4.5v to 5.5v, -40c to +150c, dc to 40 mips core: 16-bit dspic33e cpu code-efficient (c and assembly) architecture 16-bit wide data path two 40-bit wide accumulators single-cycle (mac/mpy) with dual data fetch single-cycle, mixed-sign mul plus hardware divide 32-bit multiply support intermediate security for memory: - provides a boot flash segment in addition to the existing general flash segment error code correction (ecc) for flash added two alternate register sets for fast context switching clock management internal, 15% low-power rc (lprc) C 32 khz internal, 1% fast rc (frc) C 7.37 mhz internal, 10% backup frc (bfrc) C 7.37 mhz programmable plls and oscillator clock sources fail-safe clock monitor (fscm) additional fscm source (bfrc), intended to provide a clock fail switch source for the system clock independent watchdog timer (wdt) system windowed watchdog timer (dmt) fast wake-up and start-up power management low-power management modes (sleep, idle and doze) power consumption minimized executing nop string integrated power-on reset (por) and brown-out reset (bor) 0.5 ma/mhz dynamic current (typical) 50 a at +25c i pd current (typical) pwm up to six pulse-width modulation (pwm) outputs (three generators) primary master time base inputs allow time base synchronization from internal/external sources dead time for rising and falling edges 7.14 ns pwm resolution pwm support for: - dc/dc, ac/dc, inverters, power factor correction (pfc) and lighting - brushless direct current (bldc), permanent magnet synchronous motor (pmsm), ac induction motor (acim), switched reluctance motor (srm) - programmable fault inputs - flexible trigger configurations for analog-to-digital conversion - supports pwm lock, pwm output chopping and dynamic phase shifting advanced analog features adc module: - configurable as 10-bit, 1.1 msps with four s&h or 12-bit, 500 ksps with one s&h - up to 36 analog inputs flexible and independent adc trigger sources up to four op amp/comparators with direct connection to the adc module: - additional dedicated comparator and 7-bit digital-to-analog converter (dac) - two comparator voltage reference outputs - programmable references with 128 voltage points - programmable blanking and filtering charge time measurement unit (ctmu): - supports mtouch? capacitive touch sensing - provides high-resolution time measurement (1 ns) - on-chip temperature measurement - temperature sensor diode - nine sources of edge input triggers (cted1, cted2, ocpwm, tmr1, sysclk, osclk, frc, bfrc and lprc) 16-bit, 5v digital signal controllers with pwm, sent, op amps and advanced analog features downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 2 ? 2013-2015 microchip technology inc. timers/output compare/input capture nine general purpose timers: - five 16-bit and up to two 32-bit timers/counters; timer3 can provide adc trigger four output compare modules configurable as timers/counters four input capture modules communication interfaces two enhanced addressable universal asynchronous receiver/transmitter (uart) modules (6.25 mbps): - with support for lin/j2602 bus and irda ? - high and low speed (sci) two spi modules (15 mbps): - 25 mbps data rate without using pps one i 2 c? module (up to 1 mbaud) with smbus support two sent j2716 (single-edge nibble transmission-transmit/receive) module for automotive applications one can module: - 32 buffers, 16 filters and three masks direct memory access (dma) 4-channel dma with user-selectable priority arbitration uart, serial peripheral interface (spi), adc, input capture, output compare and controller area network (can) input/output gpio registers to support selectable slew rate i/os peripheral pin select (pps) to allow function remap sink/source: 8 ma or 12 ma, pin-specific for standard v oh /v ol selectable open-drain, pull-ups and pull-downs change notice interrupts on all i/o pins qualification and class b support aec-q100 revg (grade 1: -40c to +125c) completed aec-q100 revg (grade 0: -40c to +150c) planned class b safety library, iec 60730 class b fault handling support backup frc windowed wdt uses lprc windowed deadman timer (dmt) uses system clock (system windowed watchdog timer) h/w clock monitor circuit oscillator frequency monitoring through ctmu (osci, sysclk, frc, bfrc, lprc) dedicated pwm fault pin lockable clock configuration debugger development support in-circuit and in-application programming three complex and five simple breakpoints trace and run-time watch downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 3 dspic33evxxxgm00x/10x family dspic33evxxxgm00x/10x product families the device names, pin counts, memory sizes and peripheral availability of each device are listed in tab l e 1 . the following pages show the devices pinout diagrams. table 1: dspic33evxxxgm00x/10x family devices device program memory bytes sram bytes can dma channels 16-bit timers (t1) 32-bit timers input capture output compare pwm uart spi i 2 c? sent 10/12-bit adc adc inputs op amp/comparators ctmu security peripheral pin select (pps) general purpose i/o (gpio) external interrupts pins packages dspic33ev32gm002 32k 4k 0 452443 x 2221211 13 / 41i n t e r m e d i a t ey2 132 8 spdip, soic, qfn-s dspic33ev32gm102 1 dspic33ev64gm002 64k 8k 0 dspic33ev64gm102 1 dspic33ev128gm002 128k 8k 0 dspic33ev128gm102 1 dspic33ev256gm002 256k 16k 0 dspic33ev256gm102 1 dspic33ev32gm004 32k 4k 0 452443 x 2221212 44 / 51i n t e r m e d i a t ey3 534 4 t q f p , q f n dspic33ev32gm104 1 dspic33ev64gm004 64k 8k 0 dspic33ev64gm104 1 dspic33ev128gm004 128k 8k 0 dspic33ev128gm104 1 dspic33ev256gm004 256k 16k 0 dspic33ev256gm104 1 dspic33ev32gm006 32k 4k 0 452443 x 2221213 64 / 51i n t e r m e d i a t ey5 336 4 t q f p , q f n dspic33ev32gm106 1 dspic33ev64gm006 64k 8k 0 dspic33ev64gm106 1 dspic33ev128gm006 128k 8k 0 dspic33ev128gm106 1 dspic33ev256gm006 256k 16k 0 dspic33ev256gm106 1 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 4 ? 2013-2015 microchip technology inc. pin diagrams 28-pin spdip/soic (1,2,3) mclr av dd av ss rpi47/pwm1l1/t5ck/rb15 pged3/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 rpi46/pwm1h1/t3ck/rb14 rpi45/pwm1l2/ctpls/rb13 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 rpi44/pwm1h2/rb12 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rb3 rp43/pwm1l3/rb11 rp42/pwm1h3/rb10 osc1/clki/an32/rpi18/ra2 v cap osc2/clko/rpi19/ra3 v ss flt32/rp36/rb4 oa5in-/an27/c5in1-/asda1/sdi1/rp41/rb9 oa5in+/an24/c5in3-/c5in1+/c4in1+/rp20/t1ck/ra4 an26/cv ref1o /ascl1/sdo1/rp40/t4ck/rb8 v dd oa5out/an25/c5in4-/sck1/rp39/int0/rb7 pged2/sda1/rp37/rb5 pgec2/scl1/rp38/rb6 v ss oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 dspic33ev128gm002/102 dspic33ev64gm002/102 dspic33ev256gm002/102 12 3 4 5 6 7 8 9 10 11 12 13 14 2827 26 25 24 23 22 21 20 19 18 17 16 15 note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. see section 11.5 peripheral pin select (pps) for available peripherals and information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: if the op amp is selected when opaen (cmxcon<10>) = 1 , the oax input is used; otherwise, the anx input is used. dspic33ev32gm002/102 pgec3/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 5 dspic33evxxxgm00x/10x family pin diagrams (continued) 28-pin qfn-s (1,2,3,4) dspic33ev 64gm002/102 dspic33ev 128gm002/102 dspic33ev256gm002/102 28 27 26 25 24 23 22 89 10 11 12 13 14 3 18 17 16 15 4 5 7 1 2 2019 6 21 oa5out/an25/c5in4-/sck1/rp39/int0/rb7 pgec2/scl1/rp38/rb6 pged2/sda1/rp37/rb5 v dd oa 5 in+/an24/c5in3-/c5 in 1+/c4in1+/rp20/t1ck/ra4 flt32/rp36/rb4 rpi45/pwm1l2/ctpls/rb13 rpi44/pwm1h2/rb12 rp43/pwm1l3/rb11 rp42/pwm1h3/rb10 v cap v ss oa5in-/an27/c5in1-/asda1/sdi1/rp41/rb9 rpi46/pwm1h1/t3ck/rb14 rpi47/pwm1l1/t5ck/rb15 av ss av dd mclr pged3/oa2in-/an2/c21n1-/ss1 /rpi32/cted2/rb0 pgec3/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 v ss osc1/clki/an32/rpi18/ra2 osc2/clko/rpi19/ra3 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rb3 oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 an26/cv ref1o /ascl1/sdo1/rp40/t4ck/rb8 note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. se e section 11.5 peripheral pin select (pps) for available peripherals and information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: if the op amp is selected when opaen (cmxcon<10>) = 1 , the oax input is used; otherwise, the anx input is used. 4: the metal pad at the bottom of the device is not c onnected to any pins and is recommended to be connected to v ss externally. dspic33ev 32gm002/102 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 6 ? 2013-2015 microchip technology inc. pin diagrams (continued) an26/cv ref1o /ascl1/rp40/t4ck/rb8 an56/ra10 rpi45/pwm1l2/ctpls/rb13 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rb3 oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/rc2 v dd osc1/clki/an32/rpi18/ra2 osc2/clko/rpi19/ra3 rpi24/ra8 flt32/rp36/rb4 an55/ra7 rpi46/pwm1h1/t3ck/rb14 rpi47/pwm1l1/t5ck/rb15 av ss av dd mclr oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 pgec3/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 rpi44/pwm1h2/rb12 rp43/pwm1l3/rb11 rp42/pwm1h3/rb10 v cap v ss an54/rp57/rc9 an51/rp56/rc8 an52/rp55/rc7 an53/rp54/rc6 oa5in-/an27/c5in1-/asda1/rp41/rb9 oa5out/an25/c5in4-/rp39/int0/rb7 pgec2/scl1/rp38/rb6 pged2/sda1/rp37/rb5 v dd v ss an31/cv ref2o /rpi53/rc5 an30/cv ref +/rpi52/rc4 an29/sck1/rpi51/rc3 an28/sdi1/rpi25/ra9 oa5 in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 1213 14 15 16 17 18 19 20 21 22 4443 42 41 40 39 38 37 36 35 34 3130 29 28 27 26 25 24 23 3332 12 3 4 5 6 7 8 9 10 11 v ss dspic33ev64gm004/104 dspic33ev128gm004/104 dspic33ev256gm004/104 note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. see section 11.5 peripheral pin select (pps) for available peripherals and information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: if the op amp is selected when opaen (cmxcon<10>) = 1 , the oax input is used; otherwise, the anx input is used. 44-pin tqfp (1,2,3) dspic33ev32gm004/104 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 7 dspic33evxxxgm00x/10x family pin diagrams (continued) dspic33ev64gm004/104 dspic33ev128gm004/104 dspic33ev256gm004/104 43 42 41 40 39 38 37 36 35 12 13 14 15 16 17 18 19 20 21 3 30 29 28 27 26 25 24 23 45 78 9 10 11 12 32 31 6 22 33 34 an26/cv ref1o /ascl1/rp40/t4ck/rb8 an56/ra10 rpi45/pwm1l2/ctpls/rb13 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/ctmuc/rp35/rb3 oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/rc0 oa3 in-/an7/c3in1-/c4in1-/rp49/rc1 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/rc2 v dd v ss osc1/clki/an32/rpi18/ra2 osc2/clko/rpi19/ra3 rpi24/ra8 flt32/rp36/rb4 an55/ra7 rpi46/pwm1h1/t3ck/rb14 rpi47/pwm1l1/t5ck/rb15 av ss av dd mclr oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/oa2in-/an2/c2in1-/ss1 /rpi32/cted2/rb0 pgec3/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 rpi44/pwm1h2/rb12 rp43/pwm1l3/rb11 rp42/pwm1h3/rb10 v cap v ss an54/rp57/rc9 an51/rp56/rc8 an52/rp55/rc7 an53/rp54/rc6 oa5in-/an27/c5in1-/asda1/rp41/rb9 oa5out/an25/c5in4-/rp39/int0/rb7 pgec2/scl1/rp38/rb6 pged2/sda1/rp37/rb5 v dd v ss an31/cv ref2o /rpi53/rc5 an30/cv ref +/rpi52/rc4 an29/sck1/rpi51/rc3 an28/sdi1/rpi25/ra9 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 44 44-pin qfn (1,2,3,4) note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. se e section 11.5 peripheral pin select (pps) for available peripherals and information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: if the op amp is selected when opaen (cmxcon<10>) = 1 , the oax input is used; otherwise, the anx input is used. 4: the metal pad at the bottom of the device is not connected to any pins and is recommended to be connected to v ss externally. dspic33ev32gm004/104 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 8 ? 2013-2015 microchip technology inc. pin diagrams (continued) 64-pin tqfp (1,2,3) an55/ra7 rpi46/pwm1h1/t3ck/rb14 rpi47/pwm1l1/t5ck/rb15 an19/rp118/rg6 an18/rpi119/rg7 an17/rp120/rg8 mclr an16/rpi121/rg9 v ss v dd an10/rpi28/ra12 an9/rpi27/ra11 oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/oa2in-/an2/c2in1-/ ss1 /rpi32/cted2/rb0 pgec3/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 an56/ra10 rpi45/pwm1l2/ctpls/rb13 rpi44/pwm1h2/rb12 rp43/pwm1l3/rb11 rp42/pwm1h3/rb10 rp97/rf1 rpi96/rf0 v dd v cap an54/rp57/rc9 rp70/rd6 rp69/rd5 an51/rp56/rc8 an52/rp55/rc7 an53/rp54/rc6 oa5in-/an27//c5in1-/asda1/rp41/rb9 an26/cv ref1o /ascl1/rp40/t4ck/rb8 rpi61/rc13 oa5out/an25/c5in4-/rp39/int0/rb7 an48/cv ref2o /rpi58/rc10 pgec2/scl1/rp38/rb6 pged2/sda1/rp37/rb5 rpi72/rd8 v ss osc2/clko/rpi63/rc15 osc1/clki/an49/rpi60/rc12 v dd an31/rpi53/rc5 an30/cv ref +/rpi52/rc4 an29/sck1/rpi51/rc3 an28/sdi1/rpi25/ra9 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/(ctmuc)/rp35/rb3 av dd av ss oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 oa3in+/an8/c3in3-/c3in1+/rpi50/ u1rts /bclk1/flt3/rc2 an11/c1in2-/ u1cts /flt4/rc11 v ss v dd an12/c2in2-/c5in2-/ u2rts /bclk2/flt5/re12 an13/c3in2-/ u2cts /flt6/re13 an14/rpi94/ flt7/re14 an15/rpi95/ flt8/re15 rpi24/ra8 flt32 /rp36/rb4 dspic33ev64gm006/106 dspic33ev128gm006/106 dspic33ev256gm006/106 6463 62 61 60 59 58 57 56 5 5 5453 52 51 50 49 1 48 2 47 3 46 4 45 5 44 6 43 7 42 8 41 9 40 10 39 11 38 12 37 13 36 14 35 15 34 16 33 1718 19 20 21 22 23 24 25 26 27 28 29 30 31 32 note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. see section 11.5 peripheral pin select (pps) for available peripherals and information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: if the op amp is selected when opaen (cmxcon<10>) = 1 , the oax input is used; otherwise, the anx input is used. dspic33ev32gm006/106 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 9 dspic33evxxxgm00x/10x family pin diagrams (continued) 64-pin qfn (1,2,3,4) dspic33ev64gm006/106 dspic33ev128gm006/106 dspic33ev256gm006/106 6463 62 61 60 59 58 57 56 55 54 53 52 51 50 49 1 48 2 47 3 46 4 45 5 44 6 43 7 42 8 41 9 40 10 39 11 38 12 37 13 36 14 35 15 34 16 33 1718 19 20 21 22 23 24 25 26 27 28 29 30 31 32 an56/ra10 rpi45/pwm1l2/ctpls/rb13 rpi44/pwm1h2/rb12 rp43/pwm1l3/rb11 rp42/pwm1h3/rb10 rp97/rf1 rpi96/rf0 v dd v cap an54/ rp57/rc9 rp70/rd6 rp69/rd5 an51/rp56/rc8 an52/rp55/rc7 an53/rp54/rc6 oa5in-/an27/c5in1-/asda1/rp41/rb9 an26/cv ref1o /ascl1/rp40/t4ck/rb8 rpi61/rc13 oa5out/an25/c5in4-/rp39/int0/rb7 an48/cv ref2o /rpi58/rc10 pgec2/scl1/rp38/rb6 pged2/sda1/rp37/rb5 rpi72/rd8 v ss osc2/clko/rpi63/rc15 osc1/clki/an49/rpi60/rc12 v dd an31/rpi53/rc5 an30/cv ref +/rpi52/rc4 an29/sck1/rpi51/rc3 an28/sdi1/rpi25/ra9 oa5 in+/an24/c5in3-/c5in1+/ sdo1/rp20/t1ck/ra4 pgec1/oa1in+/an4/c1in3-/c1in1+/c2in3-/rpi34/rb2 pged1/oa1in-/an5/c1in1-/(ctmuc)/rp35/rb3 av dd av ss oa3out/an6/c3in4-/c4in4-/c4in1+/rp48/rc0 oa3in-/an7/c3in1-/c4in1-/rp49/rc1 oa3in+/an8/c3in3-/c3in1+/rpi50/u1rts /bclk1/flt3/rc2 an11/c1in2-/u1cts /flt4/rc11 v ss v dd an12/c2in2-/c5in2-/u2rts /bclk2/flt5/re12 an13/c3in2-/u2cts /flt6/re13 an14/rpi94/flt7/re14 an15/rpi95/flt8/re15 rpi24/ra8 flt32/rp36/rb4 an55/ra7 rpi46/pwm1h1/t3ck/rb14 rpi47/pwm1l1/t5ck/rb15 an19/rp118/rg6 an18/rpi119/rg7 an17/rp120/rg8 mclr an16/rpi121/rg9 v ss v dd an10/rpi28/ra12 an9/rpi27/ra11 oa2out/an0/c2in4-/c4in3-/rpi16/ra0 oa2in+/an1/c2in1+/rpi17/ra1 pged3/oa2in-/an2/c2in1-/ ss1 /rpi32/cted2/rb0 pgec3/oa1out/an3/c1in4-/c4in2-/rpi33/cted1/rb1 note 1: the rpn/rpin pins can be used by any remappable peripheral with some limitation. see section 11.5 peripheral pin select (pps) for available peripherals and information on limitations. 2: every i/o port pin (rax-rgx) can be used as a change notification pin (cnax-cngx). see section 11.0 i/o ports for more information. 3: if the op amp is selected when opaen (cmxcon<10>) = 1 , the oax input is used; otherwise, the anx input is used. 4: the metal pad at the bottom of the device is not connec ted to any pins and is recommended to be connected to v ss externally. dspic33ev32gm006/106 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 10 ? 2013-2015 microchip technology inc. table of contents 1.0 device overview ............................................................................ ................................. ........................................................... 13 2.0 guidelines for getting started with 16-bit digital signal controll ers....................................................... ................................... 17 3.0 cpu .............................................................................................. .............................................................................................. 21 4.0 memory organization .......................................... ................................................... ............ ........................................................ 31 5.0 flash program memory.................................................................. ...................................... ...................................................... 83 6.0 resets ........................................................................................... .......................... .................................................................. 91 7.0 interrupt controller ................................................................ ........................................ ............................................................. 95 8.0 direct memory access (dma) .......................................................... ........................................ ................................................ 109 9.0 oscillator configuration ...................................... ......................................................................................................... ............. 123 10.0 power-saving features......................................................... ............................................. ...................................................... 133 11.0 i/o ports ....................................................................................... ........................... ................................................................. 143 12.0 timer1 ........................................................................................ .............................................................................................. 173 13.0 timer2/3 and timer4/5 ...................................... ................................................... ............ ....................................................... 175 14.0 deadman timer (dmt) ......................................... ................................................... ............ .................................................... 181 15.0 input capture............................................ ................................................... ............... .............................................................. 189 16.0 output compare ......................................................................... .................................... .......................................................... 193 17.0 high-speed pwm module ........................................... ................................................... ....... .................................................. 199 18.0 serial peripheral interface (spi)........................................ .................................................. ..................................................... 221 19.0 inter-integrated circuit? (i 2 c?)................................................................................................ .............................................. 229 20.0 single-edge nibble transmission (sent) ....................................... .............................................. .......................................... 237 21.0 universal asynchronous receiver transmitter (uart) ............................ ............................................ .................................. 247 22.0 controller area network (can) module (dspic33evxxxgm10x devices only)................... ................................... .............. 253 23.0 charge time measurement unit (ctmu) .......................................... .............................................. ........................................ 279 24.0 10-bit/12-bit analog-to-digital converter (adc) .......................... .................................................. .......................................... 285 25.0 op amp/comparator module ........................................................... ........................................ ................................................ 301 26.0 comparator voltage reference.................................. ................................................... .......... ................................................. 313 27.0 special features ........................................................................ ................................... ........................................................... 317 28.0 instruction set summary ....................................................... ............................................. ...................................................... 327 29.0 development support............................................ ................................................... ......... ....................................................... 337 30.0 electrical characteristics ....................................................... .......................................... ......................................................... 341 31.0 high-temperature electrical characteristics....................... ......................................................... ............................................ 403 32.0 packaging information............................................. ......................................................... ........................................................ 413 appendix a: revision history.......................................... ................................................... ...... .......................................................... 435 index ................................................. ................................................... ...................... ....................................................................... 437 the microchip web site .................................................................. ....................................... ............................................................ 445 customer change notification service ....................................... ................................................... . ................................................... 445 customer support ............................................... ................................................... ............. ............................................................... 445 product identification system.................................................. ................................................................................................. .......... 447 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 11 dspic33evxxxgm00x/10x family to our valued customers it is our intention to provide our valued customers with the best documentation possible to ensure successful use of your micro chip products. to this end, we will continue to improve our publications to better suit your needs. our publications will be refined and enhanced as new volumes and updates are introduced. if you have any questions or comments regar ding this publication, please contact the marketing communications department via e-mail at docerrors@microchip.com . we welcome your feedback. most current data sheet to obtain the most up-to-date version of this data s heet, please register at our worldwide web site at: http://www.microchip.com you can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page . the last character of the literature number is the versi on number, (e.g., ds30000000a is ve rsion a of document ds30000000). errata an errata sheet, describing minor operational differences fr om the data sheet and recommended workarounds, may exist for curren t devices. as device/documentation issues become known to us, we will publish an errata sheet. the errata will specify the revisi on of silicon and revision of document to which it applies. to determine if an errata sheet exists for a particular device, please check with one of the following: microchips worldwide web site; http://www.microchip.com your local microchip sales office (see last page) when contacting a sales office, please specify which device, re vision of silicon and data sheet (include literature number) you are using. customer notification system register on our web site at www.microchip.com to receive the most current information on all of our products. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 12 ? 2013-2015 microchip technology inc. referenced sources this device data sheet is based on the following individual chapters of the dspic33/pic24 family reference manual , which are available from the microchip web site ( www.microchip.com ). the follow- ing documents should be considered as the general reference for the operation of a particular module or device feature: introduction (ds70573) cpu (ds70359) data memory (ds70595) dspic33e/pic24e program memory (ds70000613) flash programming (ds70609) interrupts (ds70000600) oscillator (ds70580) reset (ds70602) watchdog timer and power-saving modes (ds70615) i/o ports (ds70000598) timers (ds70362) codeguard? intermediate security (ds70005182) deadman timer (dmt) (ds70005155) input capture (ds70000352) output compare (ds70005157) high-speed pwm (ds70645) analog-to-digital converter (adc) (ds70621) universal asynchronous receiver transmitter (uart) (ds70000582) serial peripheral interface (spi) (ds70005185) inter-integrated circuit? (i 2 c?) (ds70000195) enhanced controller area network (ecan?) (ds70353) direct memory access (dma) (ds70348) programming and diagnostics (ds70608) op amp/comparator (ds70000357) device configuration (ds70000618) charge time measurement unit (ctmu) (ds70661) single-edge nibble transmission (sent) module (ds70005145) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 13 dspic33evxxxgm00x/10x family 1.0 device overview this document contains device-specific information for the dspic33evxxxgm00x/10x family digital signal controller (dsc) devices. dspic33evxxxgm00x/10x family devices contain extensive digital signal processor (dsp) functionality with a high-performance, 16-bit mcu architecture. figure 1-1 shows a general block diagram of the core and peripheral modules. table 1-1 lists the functions of the various pins shown in the pinout diagrams. figure 1-1: dspic33evxxxgm00 x/10x family block diagram note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the related section in the dspic33/pic24 family reference man- ual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. porta power-up timer oscillator start-up osc1/clki mclr v dd , v ss uart1/2 timing generation can1 (1) i2c1 adc timers input capture output compare av dd , av ss spi1/2 watchdog timer/ por/bor pwm remappable pins note 1: this feature or peripheral is only av ailable on dspic33evxxxgm10x devices. ctmu sent1/2 cpu refer to figure 3-1 for cpu diagram details. 16 16 portb portc portd porte portf portg ports peripheral modules timer deadman op amp/ comparator timer downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 14 ? 2013-2015 microchip technology inc. table 1-1: pinout i/o descriptions pin name pin type buffer type pps description an0-an19 an24-an32 an48, an49 an51-an56 i analog no analog input channels. clki clko i o st/ cmos nono external clock source input. always associated with osc1 pin function. oscillator crystal output. connects to crystal or resonator in crystal oscillator mode. optionally functions as clko in rc and ec modes. always associated with osc2 pin function. osc1osc2 i i/o st/ cmos nono oscillator crystal input. st buffer when configured in rc mode; cmos otherwise. oscillator crystal output. connects to crystal or resonator in crystal oscillator mode. optionally functions as clko in rc and ec modes. refclko o yes reference clock output. ic1-ic4 i st yes capture inputs 1 to 4. ocfa oc1-oc4 i o st yes yes compare fault a input (for compare channels). compare outputs 1 to 4. int0 int1 int2 ii i stst st no yes yes external interrupt 0. external interrupt 1. external interrupt 2. ra0-ra4, ra7-ra12 i/o st yes porta is a bidirectional i/o port. rb0-rb15 i/o st yes portb is a bidirectional i/o port. rc0-rc13, rc15 i/o st yes portc is a bidirectional i/o port. rd5-rd6, rd8 i/o st yes portd is a bidirectional i/o port. re12-re15 i/o st yes porte is a bidirectional i/o port. rf0-rf1 i/o st no portf is a bidirectional i/o port. rg6-rg9 i/o st yes portg is a bidirectional i/o port. t1ck t2ck t3ck t4ck t5ck ii i i i stst st st st no yes nono no timer1 external clock input. timer2 external clock input. timer3 external clock input. timer4 external clock input. timer5 external clock input. ctpls cted1 cted2 o ii stst st nono no ctmu pulse output. ctmu external edge input 1. ctmu external edge input 2. u1cts u1rts u1rx u1tx i o i o st st yes yes yes yes uart1 clear-to-send. uart1 ready-to-send. uart1 receive. uart1 transmit. u2cts u2rts u2rx u2tx i o i o st st yes yes yes yes uart2 clear-to-send. uart2 ready-to-send. uart2 receive. uart2 transmit. sck1 sdi1 sdo1 ss1 i/o i o i/o stst st nono no no synchronous serial clock input/output for spi1. spi1 data in. spi1 data out. spi1 slave synchronization or frame pulse i/o. legend: cmos = cmos compatible input or output analog = analog input p = power st = schmitt trigger input with cmos levels o = output i = input pps = peripheral pin select ttl = ttl input buffer downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 15 dspic33evxxxgm00x/10x family sck2 sdi2 sdo2 ss2 i/o i o i/o stst st yes yes yes yes synchronous serial clock input/output for spi2. spi2 data in. spi2 data out. spi2 slave synchronization or frame pulse i/o. scl1 sda1 ascl1 asda1 i/oi/o i/o i/o stst st st nono no no synchronous serial clock input/output for i2c1. synchronous serial data input/output for i2c1. alternate synchronous serial clock input/output for i2c1. alternate synchronous serial data input/output for i2c1. c1rx c1tx i o st yes yes can1 bus receive pin. can1 bus transmit pin. sent1tx sent1rx sent2tx sent2rx o i o i yes yes yes yes sent1 transmit pin. sent1 receive pin. sent2 transmit pin. sent2 receive pin. cv ref o analog no comparator voltage reference output. c1in1+, c1in2-, c1in1-, c1in3- c1out i o analog no yes comparator 1 inputs. comparator 1 output. c2in1+, c2in2-, c2in1-, c2in3- c2out i o analog no yes comparator 2 inputs. comparator 2 output. c3in1+, c3in2-, c2in1-, c3in3- c3out i o analog no yes comparator 3 inputs. comparator 3 output. c4in1+, c4in2-, c4in1-, c4in3- c4out i o analog no yes comparator 4 inputs. comparator 4 output. c5in1+, c5in2-, c5in1-, c5in3- c5out i o analog no yes comparator 5 inputs. comparator 5 output. flt1-flt2 flt3-flt8 flt32 dtcmp1-dtcmp3 pwm1l-pwm3l pwm1h-pwm3h synci1 synco1 ii i i oo i o stst st st st yes nono yes nono yes yes pwm fault inputs 1 and 2. pwm fault inputs 3 to 8. pwm fault input 32. pwm dead-time compensation inputs 1 to 3. pwm low outputs 1 to 3. pwm high outputs 1 to 3. pwm synchronization input 1. pwm synchronization output 1. pged1pgec1 pged2 pgec2 pged3 pgec3 i/o i i/o i i/o i stst st st st st nono no no no no data i/o pin for programming/debugging communication channel 1. clock input pin for programming/debugging communication channel 1. data i/o pin for programming/debugging communication channel 2. clock input pin for programming/debugging communication channel 2. data i/o pin for programming/debugging communication channel 3. clock input pin for programming/debugging communication channel 3. mclr i/p st no master clear (reset) input. this pin is an active-low reset to the device. table 1-1: pinout i/o descriptions (continued) pin name pin type buffer type pps description legend: cmos = cmos compatible input or output analog = analog input p = power st = schmitt trigger input with cmos levels o = output i = input pps = peripheral pin select ttl = ttl input buffer downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 16 ? 2013-2015 microchip technology inc. av dd p p no positive supply for analog modules. this pin must be connected at all times. av ss p p no ground reference for analog modules. v dd p no positive supply for peripheral logic and i/o pins. v cap p no cpu logic filter capacitor connection. v ss p no ground reference for logic and i/o pins. table 1-1: pinout i/o descriptions (continued) pin name pin type buffer type pps description legend: cmos = cmos compatible input or output analog = analog input p = power st = schmitt trigger input with cmos levels o = output i = input pps = peripheral pin select ttl = ttl input buffer downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 17 dspic33evxxxgm00x/10x family 2.0 guidelines for getting started with 16-bit digital signal controllers 2.1 basic connection requirements getting started with the dspic33evxxxgm00x/10x family of 16-bit microcontrollers (mcus) requires attention to a minimal set of device pin connections before proceeding with development. the following is a list of pin names, which must always be connected: all v dd and v ss pins (see section 2.2 decoupling capacitors ) all av dd and av ss pins (regardless if adc module is not used) (see section 2.2 decoupling capacitors ) v cap (see section 2.3 cpu logic filter capacitor connection (v cap ) ) mclr pin (see section 2.4 master clear (mclr) pin ) pgecx/pgedx pins used for in-circuit serial programming? (icsp?) and debugging purposes (see section 2.5 icsp pins ) osc1 and osc2 pins when external oscillator source is used (see section 2.6 external oscillator pins ) 2.2 decoupling capacitors the use of decoupling capacitors on every pair of power supply pins, such as v dd , v ss , av dd and av ss , is required. consider the following criteria when using decoupling capacitors: value and type of capacitor: a value of 0.1 f (100 nf), 10v-20v is recommended. this capacitor should be a low equivalent series resistance (low-esr), and have resonance frequency in the range of 20 mhz and higher. it is recommended to use ceramic capacitors. placement on the printed circuit board (pcb): the decoupling capacitors should be placed as close to the pins as possible. it is recommended to place the capacitors on the same side of the board as the device. if space is constricted, the capacitor can be placed on another layer on the pcb using a via; however, ensure that the trace length from the pin to the capacitor is within one-quarter inch (6 mm) in length. handling high-frequency noise: if the board is experiencing high-frequency noise, above tens of mhz, add a second ceramic-type capacitor in parallel to the above described decoupling capacitor. the value of the second capacitor can be in the range of 0.01 f to 0.001 f. place this second capacitor next to the primary decoupling capacitor. in high-speed circuit designs, consider implementing a decade pair of capacitances as close to the power and ground pins as possible. for example, 0.1 f in parallel with 0.001 f. maximizing performance: on the board layout from the power supply circuit, run the power and return traces to the decoupling capacitors first, and then to the device pins. this ensures that the decoupling capacitors are first in the power chain. equally important is to keep the trace length between the capacitor and the power pins to a minimum, thereby reducing the pcb track inductance. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the related section in the dspic33/pic24 family reference man- ual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: the av dd and av ss pins must be connected, regardless of the adc voltage reference source. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 18 ? 2013-2015 microchip technology inc. figure 2-1: recommended minimum connection 2.2.1 tank capacitors on boards with power traces running longer than six inches in length, it is suggested to use a tank capacitor for integrated circuits including dscs to supply a local power source. the value of the tank capacitor should be determined based on the trace resistance that connects the power supply source to the device, and the maximum current drawn by the device in the appli- cation. in other words, select the tank capacitor so that it meets the acceptable voltage sag at the device. typical values range from 4.7 f to 47 f. 2.3 cpu logic filter capacitor connection (v cap ) a low-esr (<1 ohms) capacitor is required on the v cap pin, which is used to stabilize the internal voltage regulator output. the v cap pin must not be connected to v dd , and must have a capacitor greater than 4.7 f (10 f is recommended), with at least a 16v rating connected to the ground. the type can be ceramic or tantalum. see section 30.0 electrical characteristics for additional information. the placement of this capacitor should be close to the v cap pin. it is recommended that the trace length should not exceed one-quarter inch (6 mm). 2.4 master clear (mclr ) pin the mclr pin provides two specific device functions: device reset device programming and debugging during device programming and debugging, the resistance and capacitance that can be added to the pin must be considered. device programmers and debuggers drive the mclr pin. consequently, specific voltage levels (v ih and v il ) and fast signal transitions must not be adversely affected. therefore, specific values of r and c will need to be adjusted based on the application and pcb requirements. for example, as shown in figure 2-1 , it is recommended that the capacitor, c, be isolated from the mclr pin during programming and debugging operations. place the components as shown in figure 2-2 within one-quarter inch (6 mm) from the mclr pin. figure 2-2: example of mclr pin connections dspic33ev v dd v ss v dd v ss v ss v dd av dd av ss v dd v ss 0.1 f ceramic 0.1 f ceramic 0.1 f ceramic 0.1 f ceramic c r v dd mclr 0.1 f ceramic v cap l1 (1) r1 10 f tantalum note 1: as an option, instead of a hard-wired connection, an inductor (l1) can be substituted between v dd and av dd to improve adc noise rejection. the inductor impedance should be less than 1 ? and the inductor capacity greater than 10 ma. where: f f cnv 2 ------------- - = f 1 2 ? lc ?? ----------------------- = l 1 2 ? fc ?? --------------------- - ?? ?? 2 = (i.e., adc conversion rate/2) note 1: r ? 10 k ? is recommended. a suggested starting value is 10 k ? . ensure that the mclr pin v ih and v il specifications are met. 2: r1 ? 470 ? will limit any current flow into mclr from the external capacitor, c, in the event of mclr pin breakdown due to electro- static discharge (esd) or electrical overstress (eos). ensure that the mclr pin v ih and v il specifications are met. c r1 (2) r (1) v dd mclr dspic33ev jp downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 19 dspic33evxxxgm00x/10x family 2.5 icsp pins the pgecx and pgedx pins are used for icsp and debugging purposes. it is recommended to keep the trace length between the icsp connector and the icsp pins on the device as short as possible. if the icsp con- nector is expected to experience an esd event, a series resistor is recommended, with the value in the range of a few tens of ohms, not exceeding 100 ohms. pull-up resistors, series diodes and capacitors on the pgecx and pgedx pins are not recommended as they will interfere with the programmer/debugger communi- cations to the device. if such discrete components are an application requirement, they should be removed from the circuit during programming and debugging. alternatively, refer to the ac/dc characteristics and timing requirements information in the respective device flash programming specification for information on capacitive loading limits and pin voltage input high (v ih ) and voltage input low (v il ) requirements. ensure that the communication channel select (i.e., pgecx/pgedx pins) programmed into the device matches the physical connections for the icsp to mplab ? pickit? 3, mplab icd 3 or mplab real ice?. for more information on mplab icd 2, icd 3 and real ice connection requirements, refer to the following documents that are available on the microchip web site ( www.microchip.com) . using mplab ? icd 3 (poster) (ds51765) mplab ? icd 3 design advisory (ds51764) mplab ? real ice? in-circuit emulator users guide (ds51616) using mplab ? real ice? in-circuit emulator (poster) (ds51749) 2.6 external oscillator pins many dscs have options for at least two oscillators: a high-frequency primary oscillator and a low-frequency secondary oscillator. for more information, see section 9.0 oscillator configuration . the oscillator circuit should be placed on the same side of the board as the device. also, place the oscillator circuit close to the respective oscillator pins, not exceeding one-half inch (12 mm) distance between them. the load capacitors should be placed next to the oscillator itself, on the same side of the board. use a grounded copper pour around the oscillator circuit to isolate them from surrounding circuits. the grounded copper pour should be routed directly to the mcu ground. do not run any signal traces or power traces inside the ground pour. also, if using a two-sided board, avoid any traces on the other side of the board where the crystal is placed as shown in figure 2-3 . figure 2-3: suggested placement of the oscillator circuit 2.7 oscillator value conditions on device start-up if the pll of the target device is enabled and configured for the device start-up oscillator, the maximum oscillator source frequency must be limited to 5 mhz < f in < 13.6 mhz to comply with device pll start-up conditions. this intends that, if the external oscillator frequency is outside this range, the application must start up in the frc mode first. the default pll settings after a por with an oscillator frequency outside this range will violate the device operating speed. once the device powers up, the application firmware can initialize the pll sfrs, clkdiv and pllfbd, to a suitable value, and then perform a clock switch to the oscillator + pll clock source. 2.8 unused i/os unused i/o pins should be configured as outputs and driven to a logic low state. alternatively, connect a 1k to 10k resistor between v ss and unused pins, and drive the output to logic low. note: clock switching must be enabled in the device configuration word. main oscillator guard ring guard trace oscillator pins downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 20 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 21 dspic33evxxxgm00x/10x family 3.0 cpu the cpu has a 16-bit (data) modified harvard archi- tecture with an enhanced instruction set, including significant support for digital signal processing. the cpu has a 24-bit instruction word with a variable length opcode field. the program counter (pc) is 23 bits wide and addresses up to 4m x 24 bits of user program memory space. an instruction prefetch mechanism helps maintain throughput and provides predictable execution. most instructions execute in a single-cycle effective execu- tion rate, with the exception of instructions that change the program flow, the double-word move ( mov.d ) instruction, psv accesses and the table instructions. overhead-free program loop constructs are supported using the do and repeat instructions, both of which are interruptible at any point. 3.1 registers the dspic33evxxxgm00x/10x family devices have sixteen, 16-bit working registers in the programmers model. each of the working registers can act as a data, address or address offset register. the sixteenth working register (w15) operates as a software stack pointer for interrupts and calls. in addition, the dspic33evxxxgm00x/10x devices include two alternate working register sets, which consist of w0 through w14. the alternate registers can be made persistent to help reduce the saving and restoring of register content during interrupt service routines (isrs). the alternate working registers can be assigned to a specific interrupt priority level (ipl1 through ipl6) by configuring the ctxtx<2:0> bits in the faltreg configuration register. the alternate working registers can also be accessed manually by using the ctxtswp instruction. the cctxi<2:0> and mctxi<2:0> bits in the ctxtstat register can be used to identify the current, and most recent, manually selected working register sets. 3.2 instruction set the device instruction set has two classes of instruc- tions: the mcu class of instructions and the dsp class of instructions. these two instruction classes are seamlessly integrated into the architecture and exe- cute from a single execution unit. the instruction set includes many addressing modes and was designed for optimum c compiler efficiency. 3.3 data space addressing the base data space can be addressed as 4k words or 8 kbytes and is split into two blocks, referred to as x and y data memory. each memory block has its own independent address generation unit (agu). the mcu class of instructions operates solely through the x memory agu, which accesses the entire memory map as one linear data space. on dspic33ev devices, certain dsp instructions operate through the x and y agus to support dual operand reads, which splits the data address space into two parts. the x and y data space boundary is device-specific. the upper 32 kbytes of the data space (ds) memory map can optionally be mapped into program space (ps) at any 16k program word boundary. the program-to- data space mapping feature, known as program space visibility (psv), lets any instruction access program space as if it were data space. moreover, the base data space address is used in conjunction with a data space read or write page register (dsrpag or dswpag) to form an extended data space (eds) address. the eds can be addressed as 8m words or 16 mbytes. for more information on eds, psv and table accesses, refer to data memory (ds70595) and dspic33e/pic24e program memory (ds70000613) in the dspic33/ pic24 family reference manual . on dspic33ev devices, overhead-free circular buffers (modulo addressing) are supported in both x and y address spaces. the modulo addressing removes the software boundary checking overhead for dsp algorithms. the x agu circular addressing can be used with any of the mcu class of instructions. the x agu also supports bit-reversed addressing to greatly simplify input or output data reordering for radix-2 fft algorithms. figure 3-1 illustrates the block diagram of the dspic33evxxxgm00x/10x family devices. 3.4 addressing modes the cpu supports these addressing modes: inherent (no operand) relative literal memory direct register direct register indirect each instruction is associated with a predefined addressing mode group, depending upon its functional requirements. as many as six addressing modes are supported for each instruction. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to cpu (ds70359) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 22 ? 2013-2015 microchip technology inc. figure 3-1: dspic33evxxxgm00x/ 10x family cpu block diagram 16 pch 16 program counter 16-bit alu 24 24 24 24 x data bus pcu 16 16 16 divide support engine dsp rom latch 16 y data bus ea mux x ragu x wagu y agu 16 24 16 16 16 16 16 16 16 8 interrupt controller psv and table data access control block stack control logic loop control logic data latch data latch y data ram x data ram address latch address latch 16 data latch 16 16 16 x address bus y address bus 24 literal data program memory address latch power, reset and oscillator control signals to various blocks ports peripheral modules modules pcl 16 x 16 w register array ir instruction decode and control downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 23 dspic33evxxxgm00x/10x family 3.5 programmers model the programmers model for the dspic33evxxxgm00x/ 10x family is shown in figure 3-2 . all registers in the programmers model are memory-mapped and can be manipulated directly by instructions. table 3-1 lists a description of each register. in addition to the registers contained in the programmers model, the dspic33evxxxgm00x/10x family devices contain control registers for modulo addressing and bit-reversed addressing, and interrupts. these registers are described in subsequent sections of this document. all registers associated with the programmers model are memory-mapped, as shown in table 4-1 . table 3-1: programmers model register descriptions register(s) name description w0 through w15 ( 1 ) working register array w0 through w14 ( 1 ) alternate working register array 1 w0 through w14 ( 1 ) alternate working register array 2 acca, accb 40-bit dsp accumulators pc 23-bit program counter sr alu and dsp engine status register splim stack pointer limit value register tblpag table memory page address register dsrpag extended data space (eds) read page register rcount repeat loop counter register dcount do loop count register dostarth ( 2 ) , dostartl ( 2 ) do loop start address register (high and low) doendh, doendl do loop end address register (high and low) corcon contains dsp engine, do loop control and trap status bits note 1: memory-mapped w0 through w14 represents the value of the register in the curr ently active cpu context. 2: the dostarth and dostartl registers are read-only. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 24 ? 2013-2015 microchip technology inc. figure 3-2: programmers model w0w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 d0 d15 w0w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 novz c tblpag pc23 pc0 7 0 d0 d15 program counter data table page address status register alternate working/address dsp operand registers w0 (wreg) w1w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 frame pointer/w14 stack pointer/w15 dsp address registers ad39 ad0 ad31 dsp accumulators (1) acca accb dsrpag 9 0 ra 0 oa ob sa sb rcount 15 0 repeat loop counter 15 0 do loop counter and stack dostart 23 0 do loop start address and stack 0 doend do loop end address and stack ipl2 ipl1 splim stack pointer limit ad15 23 0 srl ipl0 push.s and pop.s shadows nested do stack 0 0 oab sab x data space read page address da dc 0 0 0 0 corcon 15 0 cpu core control register dcount d0 d15 registers working/address registers downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 25 dspic33evxxxgm00x/10x family 3.6 cpu control registers register 3-1: sr: cpu status register r/w-0 r/w-0 r/w-0 r/w-0 r/c-0 r/c-0 r-0 r/w-0 oa ob sa ( 3 ) sb ( 3 ) oab sab da dc bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 ipl2 ( 1,2 ) ipl1 ( 1,2 ) ipl0 ( 1,2 ) ra n ov z c bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 oa: accumulator a overflow status bit 1 = accumulator a has overflowed 0 = accumulator a has not overflowed bit 14 ob: accumulator b overflow status bit 1 = accumulator b has overflowed 0 = accumulator b has not overflowed bit 13 sa: accumulator a saturation sticky status bit ( 3 ) 1 = accumulator a is saturated or has been saturated at some time 0 = accumulator a is not saturated bit 12 sb: accumulator b saturation sticky status bit ( 3 ) 1 = accumulator b is saturated or has been saturated at some time 0 = accumulator b is not saturated bit 11 oab: oa || ob combined accumulator overflow status bit 1 = accumulator a or b has overflowed 0 = accumulator a and b have not overflowed bit 10 sab: sa || sb combined accumulator sticky status bit 1 = accumulator a or b is saturated or has been saturated at some time 0 = accumulator a and b have not been saturated bit 9 da: do loop active bit 1 = do loop is in progress 0 = do loop is not in progress bit 8 dc: mcu alu half carry/borrow bit 1 = a carry-out from the 4 th low-order bit (for byte-sized data) or 8 th low-order bit (for word-sized data) of the result occurred 0 = no carry-out from the 4 th low-order bit (for byte-sized data) or 8 th low-order bit (for word-sized data) of the result occurred note 1: the ipl<2:0> bits are concatenated with the ipl3 bit (corcon<3>) to form the cpu interrupt priority level. the value in parentheses indicates the ipl if ipl3 = 1 . user interrupts are disabled when ipl3 = 1 . 2: the ipl<2:0> status bits are read-only when the nstdis bit (intcon1<15>) = 1 . 3: a data write to the sr register can modify the sa and sb bits by either a data write to sa and sb or by clearing the sab bit. to avoid a possible sa or sb bit write race condition, the sa and sb bits should not be modified using the bit operations. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 26 ? 2013-2015 microchip technology inc. bit 7-5 ipl<2:0>: cpu interrupt priority level status bits ( 1 , 2 ) 111 = cpu interrupt priority level is 7 (15); user interrupts are disabled 110 = cpu interrupt priority level is 6 (14) 101 = cpu interrupt priority level is 5 (13) 100 = cpu interrupt priority level is 4 (12) 011 = cpu interrupt priority level is 3 (11) 010 = cpu interrupt priority level is 2 (10) 001 = cpu interrupt priority level is 1 (9) 000 = cpu interrupt priority level is 0 (8) bit 4 ra: repeat loop active bit 1 = repeat loop is in progress 0 = repeat loop is not in progress bit 3 n: mcu alu negative bit 1 = result was negative 0 = result was non-negative (zero or positive) bit 2 ov: mcu alu overflow bit this bit is used for signed arithmetic (2s complement). it indicates an overflow of the magnitude that causes the sign bit to change state. 1 = overflow occurred for signed arithmetic (in this arithmetic operat ion) 0 = overflow has not occurred for signed arithmetic bit 1 z: mcu alu zero bit 1 = an operation that affects the z bit has set it at some time in the past 0 = the most recent operation that affects the z bit has cleared it (i.e., a non-zero result) bit 0 c: mcu alu carry/borrow bit 1 = a carry-out from the most significant bit (msb) of the result occurred 0 = no carry-out from the most significant bit of the result occurred register 3-1: sr: cpu status register (continued) note 1: the ipl<2:0> bits are concatenated with the ipl3 bit (corcon<3>) to form the cpu interrupt priority level. the value in parentheses indicates the ipl if ipl3 = 1 . user interrupts are disabled when ipl3 = 1 . 2: the ipl<2:0> status bits are read-only when the nstdis bit (intcon1<15>) = 1 . 3: a data write to the sr register can modify the sa and sb bits by either a data write to sa and sb or by clearing the sab bit. to avoid a possible sa or sb bit write race condition, the sa and sb bits should not be modified using the bit operations. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 27 dspic33evxxxgm00x/10x family register 3-2: corcon: core control register r/w-0 u-0 r/w-0 r/w-0 r/w-0 r-0 r-0 r-0 var us1 us0 edt ( 1 ) dl2 dl1 dl0 bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-0 r/c-0 r-0 r/w-0 r/w-0 sata satb satdw accsat ipl3 ( 2 ) sfa rnd if bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 var: variable exception processing latency control bit 1 = variable exception processing latency is enabled 0 = fixed exception processing latency is enabled bit 14 unimplemented: read as 0 bit 13-12 us<1:0>: dsp multiply unsigned/signed control bits 11 = reserved 10 = dsp engine multiplies are mixed-sign 01 = dsp engine multiplies are unsigned 00 = dsp engine multiplies are signed bit 11 edt: early do loop termination control bit ( 1 ) 1 = terminates executing the do loop at the end of the current loop iteration 0 = no effect bit 10-8 dl<2:0>: do loop nesting level status bits 111 = 7 do loops are active 001 = 1 do loop is active 000 = 0 do loops are active bit 7 sata: acca saturation enable bit 1 = accumulator a saturation is enabled 0 = accumulator a saturation is disabled bit 6 satb: accb saturation enable bit 1 = accumulator b saturation is enabled 0 = accumulator b saturation is disabled bit 5 satdw: data space write from dsp engine saturation enable bit 1 = data space write saturation is enabled 0 = data space write saturation is disabled bit 4 accsat: accumulator saturation mode select bit 1 = 9.31 saturation (super saturation) 0 = 1.31 saturation (normal saturation) note 1: this bit is always read as 0 . 2: the ipl3 bit is concatenated with the ipl<2:0> bits (sr<7:5>) to form the cpu interrupt priority level. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 28 ? 2013-2015 microchip technology inc. bit 3 ipl3: cpu interrupt priority level status bit 3 ( 2 ) 1 = cpu interrupt priority level is greater than 7 0 = cpu interrupt priority level is 7 or less bit 2 sfa: stack frame active status bit 1 = stack frame is active; w14 and w15 address 0x0000 to 0xffff, regardless of dsrpag and dswpag values 0 = stack frame is not active; w14 and w15 address of eds or base data space bit 1 rnd: rounding mode select bit 1 = biased (conventional) rounding is enabled 0 = unbiased (convergent) rounding is enabled bit 0 if: integer or fractional multiplier mode select bit 1 = integer mode is enabled for dsp multiply 0 = fractional mode is enabled for dsp multiply register 3-2: corcon: core control register (continued) note 1: this bit is always read as 0 . 2: the ipl3 bit is concatenated with the ipl<2:0> bits (sr<7:5>) to form the cpu interrupt priority level. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 29 dspic33evxxxgm00x/10x family register 3-3: ctxtstat: cpu w re gister context status register u-0 u-0 u-0 u-0 u-0 r-0 r-0 r-0 cctxi2 cctxi1 cctxi0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r-0 r/w-0 r/w-0 mctxi2 mctxi1 mctxi0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as 0 bit 10-8 cctxi<2:0>: current (w register) context identifier bits 111 = reserved 011 = reserved 010 = alternate working register set 2 is currently in use 001 = alternate working register set 1 is currently in use 000 = default register set is currently in use bit 7-3 unimplemented: read as 0 bit 2-0 mctxi<2:0>: manual (w register) context identifier bits 111 = reserved 011 = reserved 010 = alternate working register set 2 was most recently manually selected 001 = alternate working register set 1 was most recently manually selected 000 = default register set was most recently manually selected downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 30 ? 2013-2015 microchip technology inc. 3.7 arithmetic logic unit (alu) the dspic33evxxxgm00x/10x family alu is 16 bits wide and is capable of addition, subtraction, bit shifts and logic operations. unless otherwise mentioned, arithmetic operations are twos complement in nature. depending on the operation, the alu can affect the values of the carry (c), zero (z), negative (n), overflow (ov) and digit carry (dc) status bits in the sr register. the c and dc status bits operate as borrow and digit borrow bits, respectively, for subtraction operations. the alu can perform 8-bit or 16-bit operations, depending on the mode of the instruction that is used. the data for the alu operation can come from the w register array or from the data memory, depending on the addressing mode of the instruction. similarly, the output data from the alu can be written to the w register array or a data memory location. for information on the sr bits affected by each instruction, refer to the 16-bit mcu and dsc programmers reference manual (ds70157). the core cpu incorporates hardware support for both multiplication and division. this includes a dedicated hardware multiplier and support hardware for 16-bit divisor division. 3.7.1 multiplier using the high-speed, 17-bit x 17-bit multiplier, the alu supports unsigned, signed or mixed-sign operation in several mcu multiplication modes: 16-bit x 16-bit signed 16-bit x 16-bit unsigned 16-bit signed x 5-bit (literal) unsigned 16-bit signed x 16-bit unsigned 16-bit unsigned x 5-bit (literal) unsigned 16-bit unsigned x 16-bit signed 8-bit unsigned x 8-bit unsigned 3.7.2 divider the divide block supports 32-bit/16-bit and 16-bit/16-bit signed and unsigned integer divide operations with the following data sizes: 32-bit signed/16-bit signed divide 32-bit unsigned/16-bit unsigned divide 16-bit signed/16-bit signed divide 16-bit unsigned/16-bit unsigned divide the quotient for all divide instructions ends up in w0 and the remainder in w1. the 16-bit signed and unsigned div instructions can specify any w register for both the 16-bit divisor (wn) and any w register (aligned) pair (w(m + 1):wm) for the 32-bit dividend. the divide algorithm takes the single-cycle per bit of the divisor, so both 32-bit/16-bit and 16-bit/16-bit instructions take the same number of cycles to execute. 3.8 dsp engine the dsp engine consists of a high-speed, 17-bit x 17-bit multiplier, a 40-bit barrel shifter and a 40-bit adder/ subtracter (with two target accumulators, round and saturation logic). the dsp engine can also perform inherent accumulator- to-accumulator operations that require no additional data. these instructions are add , sub and neg . the dsp engine has options selected through bits in the cpu core control register (corcon) as follows: fractional or integer dsp multiply (if) signed, unsigned or mixed-sign dsp multiply (us) conventional or convergent rounding (rnd) automatic saturation on/off for acca (sata) automatic saturation on/off for accb (satb) automatic saturation on/off for writes to data memory (satdw) accumulator saturation mode selection (accsat) table 3-2: dsp instructions summary instruction algebraic operation acc write back clr a = 0 yes ed a = (x C y) 2 no edac a = a + (x C y) 2 no mac a = a + (x y) yes mac a = a + x 2 no movsac no change in a yes mpy a = x y no mpy a = x 2 no mpy.n a = C x y no msc a = a C x y yes downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 31 dspic33evxxxgm00x/10x family 4.0 memory organization the dspic33evxxxgm00x/10x family architecture features separate program and data memory spaces and buses. this architecture also allows the direct access of program memory from the data space (ds) during code execution. 4.1 program address space the program address memory space of the dspic33evxxxgm00x/10x family devices is 4m instructions. the space is addressable by a 24-bit value derived either from the 23-bit pc, during program execution or from table operation, or from ds remapping, as described in section 4.7 interfacing program and data memory spaces . user application access to the program memory space is restricted to the lower half of the address range (0x000000 to 0x02abff). the exception is the use of the tblrd operations, which use tblpag<7> to read device id sections of the configuration memory space and the tblwt operations, which are used to set up the write latches located in configuration memory space. the program memory maps, which are presented by the device family and memory size, are shown in figure 4-1 through figure 4-4 . figure 4-1: program memory map fo r dspic33ev32gm00x/10x devices ( 1 ) note: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to dspic33e/pic24e program memory (ds70000613) in the dspic33/pic24 family reference man- ual , which is available from the microchip web site ( www.microchip.com ). reset address 0x000000 0x000002 user program flash memory 0x005780 0x00577e (10944 instructions) 0x800000 devid 0xfefffe 0xff0000 0xfffffe unimplemented (read 0 s) goto instruction 0x000004 reserved 0x7ffffe 0x000200 0x0001fe interrupt vector table configuration memory space user memory space device configuration 0x005800 0x0057fe reserved 0xff0002 note 1: memory areas are not shown to scale. 0xff0004 executive code memory 0x801000 0x800ffe user otp memory 0xf9fffe 0xfa0000 0xfa0002 0xfa0004 write latches reserved 0x800f80 reserved 0x800bfe 0x800c00 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 32 ? 2013-2015 microchip technology inc. figure 4-2: program memory map fo r dspic33ev64gm00x/10x devices ( 1 ) note 1: memory areas are not shown to scale. reset address 0x000000 0x000002 user program flash memory 0x00ab80 0x00ab7e (21696 instructions) 0x800000 devid 0xfefffe 0xff0000 0xfffffe unimplemented (read 0 s) goto instruction 0x000004 reserved 0x7ffffe 0x000200 0x0001fe interrupt vector table configuration memory space user memory space device configuration 0x00ac00 0x00abfe reserved 0xff0002 0xff0004 executive code memory 0x801000 0x800ffe user otp memory 0xf9fffe 0xfa0000 0xfa0002 0xfa0004 write latches reserved 0x800f80 reserved 0x800bfe 0x800c00 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 33 dspic33evxxxgm00x/10x family figure 4-3: program memory map fo r dspic33ev128gm00x/10x devices ( 1 ) reset address 0x000000 0x000002 user program flash memory 0x015780 0x01577e (44736 instructions) 0x800000 0xfa0000 write latches 0xfa0002 0xfa0004 devid 0xfefffe 0xff0000 0xfffffe 0xf9fffe unimplemented (read 0 s) goto instruction 0x000004 reserved 0x7ffffe reserved 0x000200 0x0001fe interrupt vector table configuration memory space user memory space 0x015800 0x0157fe reserved 0xff0002 note 1: memory areas are not shown to scale. 0xff0004 executive code memory 0x801000 0x800ffe user otp memory device configuration 0x800f80 reserved 0x800bfe 0x800c00 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 34 ? 2013-2015 microchip technology inc. figure 4-4: program memory map fo r dspic33ev256gm00x/10x devices ( 1 ) reset address 0x000000 0x000002 user program flash memory 0x02ab80 0x02ab7e (87232 instructions) 0x800000 0xfa0000 write latches 0xfa0002 0xfa0004 devid 0xfefffe 0xff0000 0xfffffe 0xf9fffe unimplemented (read 0 s ) goto instruction 0x000004 reserved 0x7ffffe reserved 0x000200 0x0001fe interrupt vector table configuration memory space user memory space 0x02ac00 0x02abfe reserved 0xff0002 note 1: memory areas are not shown to scale. 0xff0004 executive code memory 0x801000 0x800ffe user otp memory 0x800f80 device configuration reserved 0x800bfe 0x800c00 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 35 dspic33evxxxgm00x/10x family 4.1.1 program memory organization the program memory space is organized in word- addressable blocks. although it is treated as 24 bits wide, it is more appropriate to think of each address of the program memory as a lower and upper word, with the upper byte of the upper word being unimplemented. the lower word always has an even address, while the upper word has an odd address (see figure 4-5 ). program memory addresses are always word-aligned on the lower word and addresses are incremented or decremented by two during the code execution. this arrangement provides compatibility with the data memory space addressing and makes data in the program memory space accessible. 4.1.2 interrupt and trap vectors all dspic33evxxxgm00x/10x family devices reserve the addresses between 0x000000 and 0x000200 for hard-coded program execution vectors. a hardware reset vector is provided to redirect code execution from the default value of the pc on device reset to the actual start of code. a goto instruction is programmed by the user application at address, 0x000000 of flash memory, with the actual address for the start of code at address, 0x000002 of flash memory. for more information on the interrupt vector tables, see section 7.1 interrupt vector table . figure 4-5: program memory organization 0 8 16 pc address 0x000000 0x000002 0x000004 0x000006 23 0000000000000000 00000000 00000000 program memory phantom byte (read as 0 ) least significant word most significant word instruction width 0x000001 0x000003 0x000005 0x000007 msw address (lsw address) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 36 ? 2013-2015 microchip technology inc. 4.2 data address space the dspic33evxxxgm00x/10x family cpu has a separate, 16-bit wide data memory space. the data space (ds) is accessed using separate address gen- eration units (agus) for read and write operations. the data memory maps, which are presented by device family and memory size, are shown in figure 4-6 and figure 4-8 . all effective addresses (eas) in the data memory space are 16 bits wide and point to bytes within the ds. this arrangement gives a base data space address range of 64 kbytes or 32k words. the base data space address is used in conjunction with a data space read or write page register (dsrpag or dswpag) to form an extended data space (eds), which has a total address range of 16 mbytes. dspic33evxxxgm00x/10x family devices implement up to 20 kbytes of data memory (4 kbytes of data memory for special function registers and up to 16 kbytes of data memory for ram). if an ea points to a location outside of this area, an all zero word or byte is returned. 4.2.1 data space width the data memory space is organized in byte- addressable, 16-bit wide blocks. data is aligned in data memory and registers as 16-bit words, but all ds eas resolve to bytes. the least significant bytes (lsbs) of each word have even addresses, while the most significant bytes (msbs) have odd addresses. 4.2.2 data memory organization and alignment to maintain backward compatibility with pic ? mcu devices and improve data space memory usage efficiency, the dspic33evxxxgm00x/10x family instruction set supports both word and byte operations. as a consequence of byte accessibility, all the effective address calculations are internally scaled to step through word-aligned memory. for example, the core recognizes that post-modified register indirect addressing mode [ws++] results in a value of ws + 1 for byte operations and ws + 2 for word operations. a data byte read, reads the complete word that con- tains the byte, using the lsb of any ea to determine which byte to select. the selected byte is placed onto the lsb of the data path. that is, data memory and reg- isters are organized as two parallel, byte-wide entities with shared (word) address decode, but separate write lines. data byte writes only write to the corresponding side of the array or register that matches the byte address. all word accesses must be aligned to an even address. misaligned word data fetches are not supported, there- fore, care must be taken when mixing byte and word operations or translating from 8-bit mcu code. if a misaligned read or write is attempted, an address error trap is generated. if the error occurred on a read, the instruction underway is completed. if the error occurred on a write, the instruction is executed but the write does not occur. in either case, a trap is then executed, allowing the system and/or user application to examine the machine state prior to execution of the address fault. all byte loads into any w register are loaded into the lsb; the msb is not modified. a sign-extend ( se ) instruction is provided to allow user applications to translate 8-bit signed data to 16-bit signed values. alternatively, for 16-bit unsigned data, user applications can clear the msb of any w register by executing a zero-extend ( ze ) instruction on the appropriate address. 4.2.3 sfr space the first 4 kbytes of the near data space, from 0x0000 to 0x0fff, is primarily occupied by special function registers (sfrs). these are used by the dspic33evxxxgm00x/10x family core and peripheral modules for controlling the operation of the device. sfrs are distributed among the modules that they control and are generally grouped together by module. much of the sfr space contains unused addresses; these are read as 0 . 4.2.4 near data space the 8-kbyte area, between 0x0000 and 0x1fff, is referred to as the near data space. locations in this space are directly addressable through a 13-bit abso- lute address field within all memory direct instructions. additionally, the whole ds is addressable using mov instructions, which support memory direct addressing mode with a 16-bit address field, or by using indirect addressing mode using a working register as an address pointer. note: the actual set of peripheral features and interrupts varies by the device. refer to the corresponding device tables and pinout diagrams for device-specific information. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 37 dspic33evxxxgm00x/10x family figure 4-6: data memory map for 32-kbyte devices ( 1 ) 0x0000 0x0ffe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x0fff 0xffff optionally mapped into program memory space 0x1fff 0x1ffe 0x1001 0x1000 4-kbyte sfr space 4-kbyte sram space 0x2000 0x2001 space near data 8-kbyte note 1: memory areas are not shown to scale. (via psv) 0x17fe 0x17ff 0x1801 0x1800 x data unimplemented (x) sfr space 0x7fff 0x7ffe 0x8000 0x8001 x data ram (x) y data ram (y) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 38 ? 2013-2015 microchip technology inc. figure 4-7: data memory map for 64-kbyte/128-kbyte devices ( 1 ) 0x0000 0x0ffe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x0fff 0xffff optionally mapped into program memory space 0x2fff 0x2ffe 0x1001 0x1000 4-kbyte sfr space 8-kbyte sram space 0x3000 0x3001 space near data 8-kbyte note 1: memory areas are not shown to scale. (via psv) 0x1ffe 0x1fff 0x2001 0x2000 x data unimplemented (x) sfr space 0x7fff 0x7ffe 0x8000 0x8001 x data ram (x) y data ram (y) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 39 dspic33evxxxgm00x/10x family figure 4-8: data memory map for 256-kbyte devices ( 1 ) 0x0000 0x0ffe 0xfffe lsb address 16 bits lsb msb msb address 0x0001 0x0fff 0xffff optionally mapped into program memory space 0x4fff 0x4ffe 0x1001 0x1000 4-kbyte sfr space 16-kbyte sram space 0x5000 0x5001 space near data 8-kbyte note 1: memory areas are not shown to scale. (via psv) 0x2ffe 0x2fff 0x3001 0x3000 x data unimplemented (x) sfr space x data ram (x) 0x7fff 0x7ffe 0x8000 0x8001 0x1ffe 0x2000 0x1fff 0x2001 y data ram (y) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 40 ? 2013-2015 microchip technology inc. 4.2.5 x and y data spaces the dspic33evxxxgm00x/10x family core has two data spaces: x and y. these data spaces can be considered either separate (for some dsp instructions) or as one unified, linear address range (for mcu instructions). the data spaces are accessed using two address generation units (agus) and separate data paths. this feature allows certain instructions to concurrently fetch two words from ram, thereby enabling efficient execution of dsp algorithms, such as finite impulse response (fir) filtering and fast fourier transform (fft). the x ds is used by all instructions and supports all addressing modes. the x ds has separate read and write data buses. the x read data bus is the read data path for all instructions that view the ds as combined x and y address space. it is also the x data prefetch path for the dual operand dsp instructions ( mac class). the y ds is used in concert with the x ds by the mac class of instructions ( clr , ed , edac , mac , movsac , mpy , mpy.n and msc ) to provide two concurrent data read paths. both the x and y data spaces support modulo addressing mode for all instructions, subject to addressing mode restrictions. bit-reversed addressing mode is only supported for writes to the x data space. all data memory writes, including in dsp instructions, view data space as combined x and y address space. the boundary between the x and y data spaces is device-dependent and is not user-programmable. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 41 dspic33evxxxgm00x/10x family 4.3 special function register maps table 4-1: cpu core register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets w0 0000 w0 (wreg) 0000 w1 0002 w1 0000 w2 0004 w2 0000 w3 0006 w3 0000 w4 0008 w4 0000 w5 000a w5 0000 w6 000c w6 0000 w7 000e w7 0000 w8 0010 w8 0000 w9 0012 w9 0000 w10 0014 w10 0000 w11 0016 w11 0000 w12 0018 w12 0000 w13 001a w13 0000 w14 001c w14 0000 w15 001e w15 0800 splim 0020 splim xxxx accal 0022 accal xxxx accah 0024 accah xxxx accau 0026 sign extension of acca<39> accau xxxx accbl 0028 accbl xxxx accbh 002a accbh xxxx accbu 002c sign extension of accb<39> accbu xxxx pcl 002e program counter low word register 0000 pch 0030 program counter high word register 0000 dsrpag 0032 data space read page register 0001 dswpag 0034 data space write page register 0001 rcount 0036 repeat loop counter register 0 xxxx dcount 0038 dcount<15:1> 0 xxxx dostartl 003a dostartl<15:1> 0 xxxx dostarth 003c dostarth<5:0> 00xx doendl 003e doendl<15:1> xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 42 ? 2013-2015 microchip technology inc. doendh 0040 doendh<5:0> 00xx sr 0042 oa ob sa sb oab sab da dc ipl2 ipl1 ipl0 ra n ov z c 0000 corcon 0044 var us1 us0 edt dl2 dl1 dl0 sata satb satdw accsat ipl3 sfa rnd if 0020 modcon 0046 xmoden ymoden bwm3 bwm2 bwm1 bwm0 ywm3 ywm2 ywm1 ywm0 xwm3 xwm2 xwm1 xwm0 0000 xmodsrt 0048 xmodsrt<15:1> 0 xxxx xmodend 004a xmodend<15:1> 1 xxxx ymodsrt 004c ymodsrt<15:1> 0 xxxx ymodend 004e ymodend<15:1> 1 xxxx xbrev 0050 bren xbrev14 xbrev13 xbrev12 xbrev11 xbrev10 xbrev9 xbrev8 xbrev7 xbrev6 xbrev5 xbrev4 xbrev3 xbrev2 xbrev1 xbrev0 8xxx disicnt 0052 disicnt<13:0> xxxx tblpag 0054 tblpag<7:0> 0000 mstrpr 0058 mstrpr<15:0> 0000 ctxtstat 005a cctxi2 cctxi1 cctxi0 mctxi2 mctxi1 mctxi0 0000 table 4-1: cpu core register map (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 43 dspic33evxxxgm00x/10x family table 4-2: timers register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets tmr1 0100 timer1 register 0000 pr1 0102 period register 1 ffff t1con 0104 ton t s i d l tgate tckps1 tckps0 tsync tcs 0000 tmr2 0106 timer2 register 0000 tmr3hld 0108 timer3 holding register (for 32-bit timer operations only) 0000 tmr3 010a timer3 register 0000 pr2 010c period register 2 ffff pr3 010e period register 3 ffff t2con 0110 ton t s i d l tgate tckps1 tckps0 t32 t c s 0000 t3con 0112 ton t s i d l tgate tckps1 tckps0 t c s 0000 tmr4 0114 timer4 register 0000 tmr5hld 0116 timer5 holding register (for 32-bit operations only) 0000 tmr5 0118 timer5 register 0000 pr4 011a period register 4 ffff pr5 011c period register 5 ffff t4con 011e ton t s i d l tgate tckps1 tckps0 t32 t c s 0000 t5con 0120 ton t s i d l tgate tckps1 tckps0 t c s 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 44 ? 2013-2015 microchip technology inc. table 4-3: input capture 1 throug h input capture 4 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets ic1con1 0140 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic1con2 0142 ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic1buf 0144 input capture 1 buffer register xxxx ic1tmr 0146 input capture 1 timer register 0000 ic2con1 0148 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic2con2 014a ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic2buf 014c input capture 2 buffer register xxxx ic2tmr 014e input capture 2 timer register 0000 ic3con1 0150 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic3con2 0152 ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic3buf 0154 input capture 3 buffer register xxxx ic3tmr 0156 input capture 3 timer register 0000 ic4con1 0158 icsidl ictsel2 ictsel1 ictsel0 ici1 ici0 icov icbne icm2 icm1 icm0 0000 ic4con2 015a ic32 ictrig trigstat syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000d ic4buf 015c input capture 4 buffer register xxxx ic4tmr 015e input capture 4 timer register 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-4: i2c1 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets i2c1con1 0200 i2cen i2csidl sclrel strict a10m disslw smen gcen stren ackdt acken rcen pen rsen sen 1000 i2c1con2 0202 pcie scie boen sdaht sbcde ahen dhen 1000 i2c1stat 0204 ackstat trstat acktim bcl gcstat add10 iwcol i2cov d_a p s r_w rbf tbf 0000 i2c1add 0206 i2c1 address register 0000 i2c1msk 0208 i2c1 address mask register 0000 i2c1brg 020a baud rate generator register 0000 i2c1trn 020c i2c1 transmit register 00ff i2c1rcv 020e i2c1 receive register 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 45 dspic33evxxxgm00x/10x family table 4-6: spi1 and spi2 register map table 4-5: uart1 and uart2 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets u1mode 0220 uarten usidl iren rtsmd uen1 uen0 wake lpback abaud urxinv brgh pdsel1 pdsel0 stsel 0000 u1sta 0222 utxisel1 utxinv utxisel0 utxbrk utxen utxbf trmt urxisel1 urxisel0 adden ridle perr ferr oerr urxda 0110 u1txreg 0224 uart1 transmit register xxxx u1rxreg 0226 uart1 receive register 0000 u1brg 0228 uart1 baud rate generator prescaler register 0000 u2mode 0230 uarten usidl iren rtsmd uen1 uen0 wake lpback abaud urxinv brgh pdsel1 pdsel0 stsel 0000 u2sta 0232 utxisel1 utxinv utxisel0 utxbrk utxen utxbf trmt urxisel1 urxisel0 adden ridle perr ferr oerr urxda 0110 u2txreg 0234 uart2 transmit register xxxx u2rxreg 0236 uart2 receive register 0000 u2brg 0238 uart2 baud rate generator prescaler register 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets spi1stat 0240 spien spisidl spibec2 spibec1 spibec0 srmpt spirov srxmpt sisel2 sisel1 sisel0 spitbf spirbf 0000 spi1con1 0242 dissck dissdo mode16 smp cke ssen ckp msten spre2 spre1 spre0 ppre1 ppre0 0000 spi1con2 0244 frmen spifsd frmpol frmdly spiben 0000 spi1buf 0248 spi1 transmit and receive buffer register 0000 spi2stat 0260 spien spisidl spibec2 spibec1 spibec0 srmpt spirov srxmpt sisel2 sisel1 sisel0 spitbf spirbf 0000 spi2con1 0262 dissck dissdo mode16 smp cke ssen ckp msten spre2 spre1 spre0 ppre1 ppre0 0000 spi2con2 0264 frmen spifsd frmpol frmdly spiben 0000 spi2buf 0268 spi2 transmit and receive buffer register 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 46 ? 2013-2015 microchip technology inc. table 4-7: adc1 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets adc1buf0 0300 adc1 data buffer 0 xxxx adc1buf1 0302 adc1 data buffer 1 xxxx adc1buf2 0304 adc1 data buffer 2 xxxx adc1buf3 0306 adc1 data buffer 3 xxxx adc1buf4 0308 adc1 data buffer 4 xxxx adc1buf5 030a adc1 data buffer 5 xxxx adc1buf6 030c adc1 data buffer 6 xxxx adc1buf7 030e adc1 data buffer 7 xxxx adc1buf8 0310 adc1 data buffer 8 xxxx adc1buf9 0312 adc1 data buffer 9 xxxx adc1bufa 0314 adc1 data buffer 10 xxxx adc1bufb 0316 adc1 data buffer 11 xxxx adc1bufc 0318 adc1 data buffer 12 xxxx adc1bufd 031a adc1 data buffer 13 xxxx adc1bufe 031c adc1 data buffer 14 xxxx adc1buff 031e adc1 data buffer 15 xxxx ad1con1 0320 adon adsidl addmabm ad12b form1 form0 ssrc2 ssrc1 ssrc0 ssrcg simsam asam samp done 0000 ad1con2 0322 vcfg2 vcfg1 vcfg0 cscna chps1 chps0 bufs smpi4 smpi3 smpi2 smpi1 smpi0 bufm alts 0000 ad1con3 0324 adrc samc4 samc3 samc2 samc1 samc0 adcs7 adcs6 adcs5 adcs4 adcs3 adcs2 adcs1 adcs0 0000 ad1chs123 0326 ch123sb2 ch123sb1 ch123nb1 ch123nb0 ch123sb0 ch123sa2 ch123sa1 ch123na1 ch123na0 ch123sa0 0000 ad1chs0 0328 ch0nb ch0sb5 ch0sb4 ch0sb3 ch0sb2 ch0sb1 ch0sb0 ch0na ch0sa5 ch0sa4 ch0sa3 ch0sa2 ch0sa1 ch0sa0 0000 ad1cssh 032e css<31:24> css<19:16> 0000 ad1cssl 0330 css<15:0> 0000 ad1con4 0332 addmaen dmabl2 dmabl1 dmabl0 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-8: ctmu register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets ctmucon1 033a ctmuen ctmusidl tgen edgen edgseqen idissen cttrig 0000 ctmucon2 033c edg1mod edg1pol edg1sel3 edg1sel2 edg1sel1 edg1sel0 ed g2stat edg1stat edg2mod edg2pol edg2sel3 edg2sel2 edg2sel1 edg2sel0 0000 ctmuicon 033e itrim5 itrim4 itrim3 itrim2 itrim1 itrim0 irng1 irng0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 47 dspic33evxxxgm00x/10x family table 4-9: can1 register map when win (c1ctrl<0>) = 0 or 1 for dspic33evxxxgm10x devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets c1ctrl1 0400 csidl abat cancks reqop2 reqop1 reqop0 opmode2 opmode1 opmode0 c a n c a p w i n 0480 c1ctrl2 0402 dncnt<4:0> 0000 c1vec 0404 filhit4 filhit3 filhit2 filhit1 filhit0 icode6 icode5 icode4 icode3 icode2 icode1 icode0 0000 c1fctrl 0406 dmabs2 dmabs1 dm abs0 fsa5 fsa4 fsa3 fsa2 fsa1 fsa0 0000 c1fifo 0408 fbp5 fbp4 fbp3 fbp2 fbp1 fbp0 fnrb5 fnrb4 fnrb3 fnrb2 fnrb1 fnrb0 0000 c1intf 040a txbo txbp rxbp txwar rxwar ewarn ivrif wakif errif fifoif rbovif rbif tbif 0000 c1inte 040c ivrie wakie errie fifoie rbovie rbie tbie 0000 c1ec 040e terrcnt7 terrcnt6 terrcnt5 terrcnt4 terrcnt3 terrcnt2 terr cnt1 terrcnt0 rerrcnt7 rerrcnt6 rerrcnt5 rerrcnt4 rerrcnt3 rer rcnt2 rerrcnt 1 rerrcnt0 0000 c1cfg1 0410 sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 0000 c1cfg2 0412 w a k f i l seg2ph2 seg2ph1 seg2ph0 seg2phts sam seg1ph2 seg1ph1 seg1ph0 prseg2 prseg1 prseg 0 0000 c1fen1 0414 flten<15:0> ffff c1fmsksel1 0418 f7msk1 f7msk0 f6msk1 f6msk0 f5msk1 f5msk0 f4msk1 f4m sk0 f3msk1 f3msk0 f2msk1 f2msk0 f1msk1 f1msk0 f0msk1 f0msk0 0000 c1fmsksel2 041a f15msk1 f15msk0 f14msk1 f14msk0 f13msk1 f13msk0 f12m sk1 f12msk0 f11msk1 f11msk0 f10msk1 f10msk0 f9msk1 f9msk0 f8msk 1 f8msk0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-10: can1 register map when win (c1ctrl<0>) = 0 for dspic33evxxxgm10x devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bi t 1 bit 0 all resets 0400- 041e see definition when win = x c1rxful1 0420 rxful<15:0> 0000 c1rxful2 0422 rxful<31:16> 0000 c1rxovf1 0428 rxovf<15:0> 0000 c1rxovf2 042a rxovf<31:16> 0000 c1tr01con 0430 txen1 txabt 1 txlarb1 txerr1 txreq1 rtren1 tx1pri1 tx1pri0 txen 0 txabat0 txlarb0 txerr0 txreq0 rtren0 tx0pri1 tx0pri0 0000 c1tr23con 0432 txen3 txabt 3 txlarb3 txerr3 txreq3 rtren3 tx3pri1 tx3pri0 txen 2 txabat2 txlarb2 txerr2 txreq2 rtren2 tx2pri1 tx2pri0 0000 c1tr45con 0434 txen5 txabt 5 txlarb5 txerr5 txreq5 rtren5 tx5pri1 tx5pri0 txen 4 txabat4 txlarb4 txerr4 txreq4 rtren4 tx4pri1 tx4pri0 0000 c1tr67con 0436 txen7 txabt 7 txlarb7 txerr7 txreq7 rtren7 tx7pri1 tx7pri0 txen 6 txabat6 txlarb6 txerr6 txreq6 rtren6 tx6pri1 tx6pri0 xxxx c1rxd 0440 can1 receive data word register xxxx c1txd 0442 can1 transmit data word register xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 48 ? 2013-2015 microchip technology inc. table 4-11: can1 register map when win (c1ctrl<0>) = 1 for dspic33evxxxgm10x devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 b it 1 bit 0 all resets 0400- 041e see definition when win = x c1bufpnt1 0420 f3bp3 f3bp2 f3bp1 f3bp0 f2bp3 f2bp2 f2bp1 f2bp0 f1bp3 f1bp2 f1bp1 f1bp0 f0bp3 f0bp2 f0bp1 f0bp0 0000 c1bufpnt2 0422 f7bp3 f7bp2 f7bp1 f7bp0 f6bp3 f6bp2 f6bp1 f6bp0 f5bp3 f5bp2 f5bp1 f5bp0 f4bp3 f4bp2 f4bp1 f4bp0 0000 c1bufpnt3 0424 f11bp3 f11bp2 f11bp1 f11bp0 f10bp3 f10bp2 f10bp1 f10bp0 f9bp3 f 9bp2 f9bp1 f9bp0 f8bp3 f8bp2 f8bp1 f8bp0 0000 c1bufpnt4 0426 f15bp3 f15bp2 f15bp1 f15bp0 f14bp3 f14bp2 f14bp1 f14bp0 f13bp3 f13 bp2 f13bp1 f13bp0 f12bp3 f12bp2 f12bp1 f12bp0 0000 c1rxm0sid 0430 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c1rxm0eid 0432 eid<15:0> xxxx c1rxm1sid 0434 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c1rxm1eid 0436 eid<15:0> xxxx c1rxm2sid 0438 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 xxxx c1rxm2eid 043a eid<15:0> xxxx c1rxf0sid 0440 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf0eid 0442 eid<15:0> xxxx c1rxf1sid 0444 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf1eid 0446 eid<15:0> xxxx c1rxf2sid 0448 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf2eid 044a eid<15:0> xxxx c1rxf3sid 044c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf3eid 044e eid<15:0> xxxx c1rxf4sid 0450 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf4eid 0452 eid<15:0> xxxx c1rxf5sid 0454 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf5eid 0456 eid<15:0> xxxx c1rxf6sid 0458 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf6eid 045a eid<15:0> xxxx c1rxf7sid 045c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf7eid 045e eid<15:0> xxxx c1rxf8sid 0460 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf8eid 0462 eid<15:0> xxxx c1rxf9sid 0464 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf9eid 0466 eid<15:0> xxxx c1rxf10sid 0468 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf10eid 046a eid<15:0> xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 49 dspic33evxxxgm00x/10x family table 4-12: sent1 receiver register map table 4-13: sent2 receiver register map c1rxf11sid 046c sid10 sid9 sid8 sid 7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf11eid 046e eid<15:0> xxxx c1rxf12sid 0470 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf12eid 0472 eid<15:0> xxxx c1rxf13sid 0474 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf13eid 0476 eid<15:0> xxxx c1rxf14sid 0478 sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf14eid 047a eid<15:0> xxxx c1rxf15sid 047c sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 sid2 sid1 sid0 exide e i d 1 7e i d 1 6 xxxx c1rxf15eid 047e eid<15:0> xxxx sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets sent1con1 0500 snten sntsidl rcven txm txpol crcen ppp spcen p s nibcnt2 nibcnt1 nibcnt0 0000 sent1con2 0504 ticktime<15:0> (transmit modes) or syncmax<15:0> (receive mode) ffff sent1con3 0508 frametime<15:0> (transmit modes) or syncmin<15:0> (receive mode) ffff sent1stat 050c pause nib2 nib1 nib0 crcerr frmerr rxidle synctxen 0000 sent1sync 0510 synchronization time period register (transmit mode) 0000 sent1datl 0514 data4<3:0> data5<3:0> data6<3:0> crc<3:0> 0000 sent1dath 0516 stat<3:0> data1<3:0> data2<3:0> data3<3:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets sent2con1 0520 snten sntsidl rcven txm txpol crcen ppp spcen p s nibcnt2 nibcnt1 nibcnt0 0000 sent2con2 0524 ticktime<15:0> (transmit modes) or syncmax<15:0> (receive mode) ffff sent2con3 0528 frametime<15:0> (transmit modes) or syncmin<15:0> (receive mode) ffff sent2stat 052c pause nib2 nib1 nib0 crcerr frmerr rxidle synctxen 0000 sent2sync 0530 synchronization time period register (transmit mode) 0000 sent2datl 0534 data4<3:0> data5<3:0> data6<3:0> crc<3:0> 0000 sent2dath 0536 stat<3:0> data1<3:0> data2<3:0> data3<3:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-11: can1 register map when win (c1ctrl<0>) = 1 for dspic33evxxxgm10x devices (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 b it 1 bit 0 all resets legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 50 ? 2013-2015 microchip technology inc. table 4-14: peripheral pin select output regi ster map for dspic33evxxxgm002/102 devices table 4-15: peripheral pin select output regi ster map for dspic33evxxxgm004/104 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rpor0 0670 rp35r5 rp35r4 rp35r3 rp35r2 rp35r1 rp35r0 rp20r5 rp20r4 rp20r3 rp20r2 rp20r1 rp20r0 0000 rpor1 0672 rp37r5 rp37r4 rp37r3 rp37r2 rp37r1 rp37r0 rp36r5 rp36r4 rp36r3 rp36r2 rp36r1 rp36r0 0000 rpor2 0674 rp39r5 rp39r4 rp39r3 rp39r2 rp39r1 rp39r0 rp38r5 rp38r4 rp38r3 rp38r2 rp38r1 rp38r0 0000 rpor3 0676 rp41r5 rp41r4 rp41r3 rp41r2 rp41r1 rp41r0 rp40r5 rp40r4 rp40r3 rp40r2 rp40r1 rp40r0 0000 rpor4 0678 rp43r5 rp43r4 rp43r3 rp43r2 rp43r1 rp43r0 rp42r5 rp42r4 rp42r3 rp42r2 rp42r1 rp42r0 0000 rpor10 0684 rp176r<5:0> 0000 rpor11 0686 rp178r5 rp178r4 rp178r3 rp178r2 rp178r1 rp178r0 rp177r5 rp177r4 rp177r3 rp177r2 rp177r1 rp177r0 0000 rpor12 0688 rp180r5 rp180r4 rp180r3 rp180r2 rp180r1 rp180r0 rp179r5 rp179r4 rp179r3 rp179r2 rp179r1 rp179r0 0000 rpor13 068a rp181r<5:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rpor0 0670 rp35r5 rp35r4 rp35r3 rp35r2 rp35r1 rp35r0 rp20r5 rp20r4 rp20r3 rp20r2 rp20r1 rp20r0 0000 rpor1 0672 rp37r5 rp37r4 rp37r3 rp37r2 rp37r1 rp37r0 rp36r5 rp36r4 rp36r3 rp36r2 rp36r1 rp36r0 0000 rpor2 0674 rp39r5 rp39r4 rp39r3 rp39r2 rp39r1 rp39r0 rp38r5 rp38r4 rp38r3 rp38r2 rp38r1 rp38r0 0000 rpor3 0676 rp41r5 rp41r4 rp41r3 rp41r2 rp41r1 rp41r0 rp40r5 rp40r4 rp40r3 rp40r2 rp40r1 rp40r0 0000 rpor4 0678 rp43r5 rp43r4 rp43r3 rp43r2 rp43r1 rp43r0 rp42r5 rp42r4 rp42r3 rp42r2 rp42r1 rp42r0 0000 rpor5 067a rp49r5 rp49r4 rp49r3 rp49r2 rp49r1 rp49r0 rp48r5 rp48r4 rp48r3 rp48r2 rp48r1 rp48r0 0000 rpor6 067c rp55r5 rp55r4 rp55r3 rp55r2 rp55r1 rp55r0 rp54r5 rp54r4 rp54r3 rp54r2 rp54r1 rp54r0 0000 rpor7 067e rp57r5 rp57r4 rp57r3 rp57r2 rp57r1 rp57r0 rp56r5 rp56r4 rp56r3 rp56r2 rp56r1 rp56r0 0000 rpor10 0684 rp176r<5:0> 0000 rpor11 0686 rp178r5 rp178r4 rp178r3 rp178r2 rp178r1 rp178r0 rp177r5 rp177r4 rp177r3 rp177r2 rp177r1 rp177r0 0000 rpor12 0688 rp180r5 rp180r4 rp180r3 rp180r2 rp180r1 rp180r0 rp179r5 rp179r4 rp179r3 rp179r2 rp179r1 rp179r0 0000 rpor13 068a rp181r<5:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 51 dspic33evxxxgm00x/10x family table 4-16: peripheral pin select output regi ster map for dspic33evxxxgm006/106 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rpor0 0670 rp35r5 rp35r4 rp35r3 rp35r2 rp35r1 rp35r0 rp20r5 rp20r4 rp20r3 rp20r2 rp20r1 rp20r0 0000 rpor1 0672 rp37r5 rp37r4 rp37r3 rp37r2 rp37r1 rp37r0 rp36r5 rp36r4 rp36r3 rp36r2 rp36r1 rp36r0 0000 rpor2 0674 rp39r5 rp39r4 rp39r3 rp39r2 rp39r1 rp39r0 rp38r5 rp38r4 rp38r3 rp38r2 rp38r1 rp38r0 0000 rpor3 0676 rp41r5 rp41r4 rp41r3 rp41r2 rp41r1 rp41r0 rp40r5 rp40r4 rp40r3 rp40r2 rp40r1 rp40r0 0000 rpor4 0678 rp43r5 rp43r4 rp43r3 rp43r2 rp43r1 rp43r0 rp42r5 rp42r4 rp42r3 rp42r2 rp42r1 rp42r0 0000 rpor5 067a rp49r5 rp49r4 rp49r3 rp49r2 rp49r1 rp49r0 rp48r5 rp48r4 rp48r3 rp48r2 rp48r1 rp48r0 0000 rpor6 067c rp55r5 rp55r4 rp55r3 rp55r2 rp55r1 rp55r0 rp54r5 rp54r4 rp54r3 rp54r2 rp54r1 rp54r0 0000 rpor7 067e rp57r5 rp57r4 rp57r3 rp57r2 rp57r1 rp57r0 rp56r5 rp56r4 rp56r3 rp56r2 rp56r1 rp56r0 0000 rpor8 0680 rp70r5 rp70r4 rp70r3 rp70r2 rp70r1 rp70r0 rp69r5 rp69r4 rp69r3 rp69r2 rp69r1 rp69r0 0000 rpor9 0682 rp118r5 rp118r4 rp118r3 rp118r2 rp118r1 rp118r0 rp97r5 rp97r4 rp97r3 rp97r2 rp97r1 rp97r0 0000 rpor10 0684 rp176r5 rp176r4 rp176r3 rp176r2 rp176r1 rp176r0 rp120r5 rp120r4 rp120r3 rp120r2 rp120r1 rp120r0 0000 rpor11 0686 rp178r5 rp178r4 rp178r3 rp178r2 rp178r1 rp178r0 rp177r5 rp177r4 rp177r3 rp177r2 rp177r1 rp177r0 0000 rpor12 0688 rp180r5 rp180r4 rp180r3 rp180r2 rp180r1 rp180r0 rp179r5 rp179r4 rp179r3 rp179r2 rp179r1 rp179r0 0000 rpor13 068a rp181r<5:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 52 ? 2013-2015 microchip technology inc. table 4-17: peripheral input remap register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 b it 3 bit 2 bit 1 bit 0 all resets rpinr0 06a0 int1r<7:0> 0000 rpinr1 06a2 i n t 2 r < 7 : 0 > 0000 rpinr3 06a6 t2ckr<7:0> 0000 rpinr7 06ae ic2r7 ic2r6 ic2r5 ic2r4 ic2r3 ic2r2 ic2r1 ic2r0 ic1r7 ic1r6 ic1r5 ic1r4 ic1r3 ic1r2 ic1r1 ic1r0 0000 rpinr8 06b0 ic4r7 ic4r6 ic4r5 ic4r4 ic4r3 ic4r2 ic4r1 ic4r0 ic3r7 ic3r6 ic3r5 ic3r4 ic3r3 ic3r2 ic3r1 ic3r0 0000 rpinr11 06b6 ocfar<7:0> 0000 rpinr12 06b8 flt2r7 flt2r6 flt2r5 flt2r4 flt2r3 flt2r2 flt2r1 flt2r0 flt1r7 flt1r6 flt 1r5 flt1r4 flt1r3 flt1r2 flt1r1 flt1r0 0000 rpinr18 06c4 u1rxr<7:0> 0000 rpinr19 06c6 u2rxr<7:0> 0000 rpinr22 06cc sck2r7 sck2r6 sck2r5 sck2r4 sck2r3 sck2r2 sck2r1 sck2r0 sdi2r7 sdi2r6 sdi2r5 sdi2r4 sdi2r3 sdi2r2 sdi2r1 sdi2r0 0000 rpinr23 06ce ss2r<7:0> 0000 rpinr26 06d4 c1rxr<7:0> ( 1 ) 0000 rpinr37 06ea synci1r<7:0> 0000 rpinr38 06ec dtcmp1r<7:0> 0000 rpinr39 06ee dtcmp3r7 dtcmp3r6 dtcmp3r5 dtcmp3r4 dtcmp3r3 dtcmp3r2 dtcmp3r1 dtcmp3r0 dtcmp2r7 dtcmp2r6 dtcmp2r5 dtcm p2r4 dtcmp2r3 dtcmp2r2 dtcm p2r1 dtcmp2r0 0000 rpinr44 06f8 sent1r<7:0> 0000 rpinr45 06fa sent2r<7:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: this feature is available only on dspic33evxxxgm10x devices. table 4-18: dmt register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets dmtcon 0700 on 0000 dmtpreclr 0704 step1<7:0> 0000 dmtclr 0708 step2<7:0> 0000 dmtstat 070c bad1 bad2 dmtevent winopn 0000 dmtcntl 0710 counter<15:0> 0000 dmtcnth 0712 counter<31:16> 0000 dmtholdreg 0714 uprcnt<15:0> 0000 dmtpscntl 0718 pscnt<15:0> 0000 dmtpscnth 071a pscnt<31:16> 0000 dmtpsintvl 071c psintv<15:0> 0000 dmtpsintvh 071e psintv<31:16> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 53 dspic33evxxxgm00x/10x family table 4-19: nvm register map table 4-20: system control register map table 4-21: reference clock register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets nvmcon 0728 wr wren wrerr nvmsidl rpdf urerr nvmop3 nvmop2 nvmop1 nvmop0 0000 nvmadr 072a nvmadr<15:0> 0000 nvmadru 072c nvmadru<23:16> 0000 nvmkey 072e nvmkey<7:0> 0000 nvmsrcadrl 0730 nvmsrcadr<15:1> 00 0 0 0 nvmsrcadrh 0732 nvmsrcadr<23:16> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets rcon 0740 trapr iopuwr vregsf cm vregs extr swr swdten wdto sleep idle bor por note 1 osccon 0742 cosc2 cosc1 cosc0 nosc2 nosc1 nosc0 clklock iolock lock c f o s w e n note 2 clkdiv 0744 roi doze2 doze1 doze0 dozen frcdiv2 frcdiv1 frcdiv0 pllpost1 pllpost0 pllpre4 pllpre3 pllpre2 pllpre1 pllpre0 0000 pllfbd 0746 plldiv<8:0> 0000 osctun 0748 tun<5:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: rcon register reset values are dependent on the type of reset. 2: osccon register reset values are dependent on the configuration fuses. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets refocon 074e roon rosslp rosel rodiv3 rodiv2 rodiv1 rodiv0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 54 ? 2013-2015 microchip technology inc. table 4-22: pmd register map for dspic33evxxxgm00x/10x family devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pmd1 0760 t5md t4md t3md t2md t1md p w m m d i2c1md u2md u1md spi2md spi1md c 1 m d ( 1 ) ad1md 0000 pmd2 0762 ic4md ic3md ic2md ic1md oc4md oc3md oc2md oc1md 0000 pmd3 0764 c m p m d 0000 pmd4 0766 r e f o m dc t m u m d 0000 pmd6 076a pwm3md pwm2md pwm1md 0000 pmd7 076c d m a 0 m d 0000 dma1md dma2md dma3md pmd8 076e sent2mdsent1md d m t m d 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: this feature is available only on dspic33evxxxgm10x devices. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 55 dspic33evxxxgm00x/10x family table 4-23: interrupt controller register map for dspic33evxxxgm00x/10x family devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 b it 2 bit 1 bit 0 all resets ifs0 0800 nvmif dma1if ad1if u1txif u1rxif spi1if spi1eif t3if t2if oc2if ic2if dma0if t1if oc1if ic1if int0if 0000 ifs1 0802 u2txif u2rxif int2if t5if t4if oc4if oc3if dma2if int1if cnif cmpif mi2c1if si2c1if 0000 ifs2 0804 ic4if ic3if dma3if c1if c1rxif ( 1 ) spi2if spi2eif 0000 ifs3 0806 psemif 0000 ifs4 0808 c t m u i f c 1 t x i f ( 1 ) u2eif u1eif 0000 ifs5 080a pwm2if pwm1if 0000 ifs6 080c p w m 3 i f 0000 ifs8 0810 icdif 0000 ifs10 0814 i2c1bcif 0000 ifs11 0816 eccsbeif sent2if sent2eif sent1if sent1eif 0000 iec0 0820 nvmie dma1ie ad1ie u1txie u1rxie spi1ie spi1eie t3ie t2ie oc2ie ic2ie dma0ie t1ie oc1ie ic1ie int0ie 0000 iec1 0822 u2txie u2rxie int2ie t5ie t4ie oc4ie oc3ie dma2ie int1ie cnie cmpie mi2c1ie si2c1ie 0000 iec2 0824 ic4ie ic3ie dma3ie c1ie c1rxie ( 1 ) spi2ie spi2eie 0000 iec3 0826 psemie 0000 iec4 0828 c t m u i e c 1 t x i e ( 1 ) u2eie u1eie 0000 iec5 082a pwm2ie pwm1ie 0000 iec6 082c p w m 3 i e 0000 iec8 0830 icdie 0000 iec10 0834 i2c1bcie 0000 iec11 0836 eccsbeie sent2ie sent2eie sent1ie sent1eie 0000 ipc0 0840 t1ip2 t1ip1 t1ip0 oc1ip2 oc1ip1 oc1ip0 ic1ip2 ic1ip1 ic1ip0 int0ip2 int0ip1 int0ip0 4444 ipc1 0842 t2ip2 t2ip1 t2ip0 oc2ip2 oc2ip1 oc2ip0 ic2ip2 ic2ip1 ic2ip0 dma0ip2 dma0ip1 dma0ip0 4444 ipc2 0844 u1rxip2 u1rxip1 u1rxip0 spi1ip2 spi1ip1 spi1ip0 spi1eip2 spi1eip1 spi1eip0 t3ip2 t3ip1 t3ip0 4444 ipc3 0846 nvmip2 nvmip1 nvmip0 dma1ip2 dma1ip1 dma1ip0 ad1ip2 ad1ip1 ad1ip0 u1txip2 u1txip1 u1txip0 4444 ipc4 0848 cnip2 cnip1 cnip0 cmpip2 cmpip1 cmpip0 mi2c1ip2 mi2c1ip1 mi2c1ip0 si2c1ip2 si2c1ip1 si2c1ip0 4444 ipc5 084a int1ip<2:0> 0004 ipc6 084c t4ip2 t4ip1 t4ip0 oc4ip2 oc4ip1 oc4ip0 oc3ip2 oc3ip1 oc3ip0 dma2ip2 dma2ip1 dma2ip0 4444 ipc7 084e u2txip2 u2txip1 u2txip0 u2rxip2 u2rxip1 u2rxip0 int2ip2 int2ip1 int2ip0 t5ip2 t5ip1 t5ip0 4444 ipc8 0850 c1ip2 c1ip1 c1ip0 c1rxip2 ( 1 ) c1rxip1 ( 1 ) c1rxip0 ( 1 ) spi2ip2 spi2ip1 spi2ip0 spi2eip2 spi2eip1 spi2eip0 4444 ipc9 0852 ic4ip2 ic4ip1 ic4ip0 ic3ip2 ic3ip1 ic3ip0 dma3ip2 dma3ip1 dma3ip0 0444 ipc14 085c psemip<2:0> 0040 ipc16 0860 u2eip2 u2eip1 u2eip0 u1eip2 u1eip1 u1eip0 0440 ipc17 0862 c1txip<2:0> ( 1 ) 0400 legend: = unimplemented, read as 0 reset values are shown in hexadecimal. note 1: this feature is available only on dspic33evxxxgm10x devices. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 56 ? 2013-2015 microchip technology inc. ipc19 0866 ctmuip<2:0> 0040 ipc23 086e pwm2ip2 pwm2ip1 pwm2ip0 pwm1ip2 pwm1ip1 pwm1ip0 4400 ipc24 0870 pwm3ip<2:0> 0004 ipc35 0886 icdip<2:0> 0400 ipc43 0896 i2c1bcip<2:0> 0040 ipc45 089a sent1ip2 sent1ip1 sent1ip0 sent1eip2 sent1eip1 sent1eip0 4400 ipc46 089c eccsbeip2 eccsbeip1 eccsbeip0 sent2ip2 sent2ip1 sent2ip0 sent2eip2 sent2eip1 sent2eip0 0444 intcon1 08c0 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte sftacerr div0err dmacerr matherr addrerr stkerr oscfail 0000 intcon2 08c2 gie disi swtrap a i v t e n int2ep int1ep int0ep 0000 intcon3 08c4 dmt dae doovr 0000 intcon4 08c6 eccdbe sght 0000 inttreg 08c8 ilr3 ilr2 ilr1 vecnum7 vecnum6 vecnum5 vecnum4 vecnum3 vecnum2 vecnum1 vecnum0 0000 table 4-23: interrupt controller register map for ds pic33evxxxgm00x/10x family devices (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 b it 2 bit 1 bit 0 all resets legend: = unimplemented, read as 0 reset values are shown in hexadecimal. note 1: this feature is available only on dspic33evxxxgm10x devices. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 57 dspic33evxxxgm00x/10x family table 4-24: output compare register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets oc1con1 0900 ocsidl octsel2 octsel1 octsel0 enflta ocflta trigmode ocm2 ocm1 ocm0 0000 oc1con2 0902 fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc1rs 0904 output compare 1 secondary register xxxx oc1r 0906 output compare 1 register xxxx oc1tmr 0908 output compare 1 timer value register xxxx oc2con1 090a ocsidl octsel2 octsel1 octsel0 enflta ocflta trigmode ocm2 ocm1 ocm0 0000 oc2con2 090c fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc2rs 090e output compare 2 secondary register xxxx oc2r 0910 output compare 2 register xxxx oc2tmr 0912 output compare 2 timer value register xxxx oc3con1 0914 ocsidl octsel2 octsel1 octsel0 enflta ocflta trigmode ocm2 ocm1 ocm0 0000 oc3con2 0916 fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc3rs 0918 output compare 3 secondary register xxxx oc3r 091a output compare 3 register xxxx oc3tmr 091c output compare 3 timer value register xxxx oc4con1 091e ocsidl octsel2 octsel1 octsel0 enflta ocflta trigmode ocm2 ocm1 ocm0 0000 oc4con2 0920 fltmd fltout flttrien ocinv oc32 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 000c oc4rs 0922 output compare 4 secondary register xxxx oc4r 0924 output compare 4 register xxxx oc4tmr 0926 output compare 4 timer value register xxxx legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 58 ? 2013-2015 microchip technology inc. table 4-25: op amp/comparator register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets cmstat 0a80 psidl c5evt c4evt c3evt c2evt c1evt c5out c4out c3out c2out c1out 0000 cvr1con 0a82 cvren cvroe cvrss vrefsel cvr6 cvr5 cvr4 cvr3 cvr2 cvr1 cvr0 0000 cm1con 0a84 con coe cpol opaen cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm1msksrc 0a86 selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 selsrca0 0000 cm1mskcon 0a88 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm1fltr 0a8a cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cm2con 0a8c con coe cpol opaen cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm2msksrc 0a8e selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 selsrca0 0000 cm2mskcon 0a90 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm2fltr 0a92 cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cm3con 0a94 con coe cpol opaen cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm3msksrc 0a96 selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 selsrca0 0000 cm3mskcon 0a98 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm3fltr 0a9a cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cm4con 0a9c con coe cpol cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm4msksrc 0a9e selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 selsrca0 0000 cm4mskcon 0aa0 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm4fltr 0aa2 cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cm5con 0aa4 con coe cpol opaen cevt cout evpol1 evpol0 c r e f cch1 cch0 0000 cm5msksrc 0aa6 selsrcc3 selsrcc2 selsrcc1 selsrcc0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 selsrca0 0000 cm5mskcon 0aa8 hlms ocen ocnen oben obnen oaen oanen nags pags acen acnen aben abnen aaen aanen 0000 cm5fltr 0aaa cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 0000 cvr2con 0ab4 cvren cvroe ( 1 ) cvrss vrefsel cvr6 cvr5 cvr4 cvr3 cvr2 cvr1 cvr0 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. note 1: cvroe (cvr2con<14>) is not available on 28-pin devices. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 59 dspic33evxxxgm00x/10x family table 4-26: dmac register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets dma0con 0b00 chen size dir half nullw amode1 amode0 m o d e 1m o d e 0 0000 dma0req 0b02 force irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 00ff dma0stal 0b04 sta<15:0> 0000 dma0stah 0b06 s t a < 2 3 : 1 6 > 0000 dma0stbl 0b08 stb<15:0> 0000 dma0stbh 0b0a stb<23:16> 0000 dma0pad 0b0c pad<15:0> 0000 dma0cnt 0b0e cnt<13:0> 0000 dma1con 0b10 chen size dir half nullw amode1 amode0 m o d e 1m o d e 0 0000 dma1req 0b12 force irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 00ff dma1stal 0b14 sta<15:0> 0000 dma1stah 0b16 s t a < 2 3 : 1 6 > 0000 dma1stbl 0b18 stb<15:0> 0000 dma1stbh 0b1a stb<23:16> 0000 dma1pad 0b1c pad<15:0> 0000 dma1cnt 0b1e cnt<13:0> 0000 dma2con 0b20 chen size dir half nullw amode1 amode0 m o d e 1m o d e 0 0000 dma2req 0b22 force irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 00ff dma2stal 0b24 sta<15:0> 0000 dma2stah 0b26 s t a < 2 3 : 1 6 > 0000 dma2stbl 0b28 stb<15:0> 0000 dma2stbh 0b2a stb<23:16> 0000 dma2pad 0b2c pad<15:0> 0000 dma2cnt 0b2e cnt<13:0> 0000 dma3con 0b30 chen size dir half nullw amode1 amode0 m o d e 1m o d e 0 0000 dma3req 0b32 force irqsel7 irqsel6 irqsel5 irqsel4 irqsel3 irqsel2 irqsel1 irqsel0 00ff dma3stal 0b34 sta<15:0> 0000 dma3stah 0b36 s t a < 2 3 : 1 6 > 0000 dma3stbl 0b38 stb<15:0> 0000 dma3stbh 0b3a stb<23:16> 0000 dma3pad 0b3c pad<15:0> 0000 dma3cnt 0b3e cnt<13:0> 0000 dmapwc 0bf0 p w c o l < 3 : 0 > 0000 dmarqc 0bf2 r q c o l < 3 : 0 > 0000 dmapps 0bf4 p p s t < 3 : 0 > 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 60 ? 2013-2015 microchip technology inc. dmalca 0bf6 lstch<3:0> 000f dsadrl 0bf8 dsadr<15:0> 0000 dsadrh 0bfa dsadr<23:16> 0000 table 4-27: pwm register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 b it 1 bit 0 all resets ptcon 0c00 pten ptsidl sestat seien eipu syncpol syncoen syncen syncsrc2 syncsrc1 syncsrc0 sevtps3 sevtp s2 sevtps1 sevtps0 0000 ptcon2 0c02 pclkdiv<2:0> 0000 ptper 0c04 ptper<15:0> fff8 sevtcmp 0c06 sevtcmp<15:0> 0000 mdc 0c0a mdc<15:0> 0000 chop 0c1a chpclken chopclk9 chopclk8 chopclk7 chopclk6 chopclk5 chopclk4 chopclk3 chop clk2 chopclk1 chopclk0 0000 pwmkey 0c1e pwmkey<15:0> 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-28: pwm generator 1 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets pwmcon1 0c20 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc0 dtcp cam xpres iue 0000 iocon1 0c22 penh penl polh poll pmod1 pmod0 ovrenh ovrenl ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 cldat0 swap osync 0000 fclcon1 0c24 clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod fltsrc4 fltsrc3 fltsrc2 fltsrc1 fltsrc0 fltpol fltmod1 fltmod0 0000 pdc1 0c26 pdc1<15:0> 0000 phase1 0c28 phase1<15:0> 0000 dtr1 0c2a dtr1<13:0> 0000 altdtr1 0c2c altdtr1<13:0> 0000 trig1 0c32 trgcmp<15:0> 0000 trgcon1 0c34 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap1 0c38 pwmcap1<15:0> 0000 lebcon1 0c3a phr phf plr plf fltleben cll eben bch bcl bphh bphl bplh bpll 0000 lebdly1 0c3c leb<11:0> 0000 auxcon1 0c3e blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-26: dmac register map (continued) sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 61 dspic33evxxxgm00x/10x family table 4-29: pwm generator 2 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 b it 1 bit 0 all resets pwmcon2 0c40 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc0 dt cp cam xpres iue 0000 iocon2 0c42 penh penl polh poll pmod1 pmod0 ovrenh o vrenl ovrdat1 o vrdat0 fltdat1 fltdat0 cldat1 cldat0 swap o sync 0000 fclcon2 0c44 clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod fltsrc4 fltsrc3 fltsrc2 fltsrc1 fltsrc0 fltpol fltmod1 fltmod0 0000 pdc2 0c46 pdc2<15:0> 0000 phase2 0c48 phase2<15:0> 0000 dtr2 0c4a dtr2<13:0> 0000 altdtr2 0c4c altdtr2<13:0> 0000 trig2 0c52 trgcmp<15:0> 0000 trgcon2 0c54 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap2 0c58 pwmcap2<15:0> 0000 lebcon2 0c5a phr phf plr plf fltl eben clleben bch bcl bphh bphl bplh bpll 0000 lebdly2 0c5c leb<11:0> 0000 auxcon2 0c5e blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. table 4-30: pwm generator 3 register map sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 b it 0 all resets pwmcon3 0c60 fltstat clstat trgstat fltien clien trgien itb mdcs dtc1 dtc 0 dtcp cam xpres iue 0000 iocon3 0c62 penh penl polh poll pmod1 pmod0 ovrenh ovrenl ovrdat1 ovrdat0 fltdat1 fl tdat0 cldat1 cldat0 swap osync 0000 fclcon3 0c64 clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol clmod flt src4 fltsrc3 fltsrc2 fltsrc1 fltsrc0 fltpol fltmod1 fltmod0 0000 pdc3 0c66 pdc3<15:0> 0000 phase3 0c68 phase3<15:0> 0000 dtr3 0c6a dtr3<13:0> 0000 altdtr3 0c6c altdtr3<13:0> 0000 trig3 0c72 trgcmp<15:0> 0000 trgcon3 0c74 trgdiv3 trgdiv2 trgdiv1 trgdiv0 trgstrt5 trgstrt4 trgstrt3 trgstrt2 trgstrt1 trgstrt0 0000 pwmcap3 0c78 pwmcap3<15:0> 0000 lebcon3 0c7a phr phf plr plf fltl eben clleben bch bcl bphh bphl bplh bpll 0000 lebdly3 0c7c leb<11:0> 0000 auxcon3 0c7e blanksel3 blanksel2 blanksel1 blanksel0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 62 ? 2013-2015 microchip technology inc. table 4-31: porta register map for dspic33evxxxgmx06 devices table 4-32: porta register map for dspic33evxxxgmx04 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisa 0e00 t r i s a < 1 2 : 7 > trisa4 trisa<1:0> 1f93 porta 0e02 r a < 1 2 : 7 > r a 4 ra<1:0> 0000 lata 0e04 l a t a < 1 2 : 7 > l a t a 4 l a t a < 1 : 0 > 0000 odca 0e06 odca<12:7> odca4 odca<1:0> 0000 cnena 0e08 cniea<12:7> cniea4 cniea<1:0> 0000 cnpua 0e0a cnpua<12:7> cnpua4 cnpua<1:0> 0000 cnpda 0e0c cnpda<12:7> cnpda4 cnpda<1:0> 0000 ansela 0e0e ansa<12:9> ansa7 ansa4 a n s a < 1 : 0 > 1e93 sr1a 0e10 s r 1 a 9 s r 1 a 4 0000 sr0a 0e12 s r 0 a 9 s r 0 a 4 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisa 0e00 trisa<10:7> trisa<4:0> df9f porta 0e02 ra<10:7> r a < 4 : 0 > 0000 lata 0e04 lata<10:7> l a t a < 4 : 0 > 0000 odca 0e06 odca<10:7> odca<4:0> 0000 cnena 0e08 cniea<10:7> cniea<4:0> 0000 cnpua 0e0a cnpua<10:7> cnpua<4:0> 0000 cnpda 0e0c cnpda<10:7> cnpda<4:0> 0000 ansela 0e0e ansa<10:9> ansa7 ansa4 ansa<2:0> 1813 sr1a 0e10 s r 1 a 9 s r 1 a 4 0000 sr0a 0e12 s r 0 a 9 s r 0 a 4 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 63 dspic33evxxxgm00x/10x family table 4-33: porta register map for dspic33evxxxgmx02 devices table 4-34: portb register map for dspic33evxxxgmx06 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisa 0e00 trisa<4:0> df9f porta 0e02 r a < 4 : 0 > 0000 lata 0e04 l a t a < 4 : 0 > 0000 odca 0e06 odca<4:0> 0000 cnena 0e08 cniea<4:0> 0000 cnpua 0e0a cnpua<4:0> 0000 cnpda 0e0c cnpda<4:0> 0000 ansela 0e0e ansa4 ansa<2:0> 1813 sr1a 0e10 s r 1 a 4 0000 sr0a 0e12 s r 0 a 4 0000 legend: = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisb 0e14 trisb<15:0> ffff portb 0e16 rb<15:0> xxxx latb 0e18 latb<15:0> xxxx odcb 0e1a odcb<15:0> 0000 cnenb 0e1c cnieb<15:0> 0000 cnpub 0e1e cnpub<15:0> 0000 cnpdb 0e20 cnpdb<15:0> 0000 anselb 0e22 ansb<9:7> ansb<3:0> 038f sr1b 0e24 sr1b<9:7> s r 1 b 4 0000 sr0b 0e26 sr0b<9:7> s r 0 b 4 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 64 ? 2013-2015 microchip technology inc. table 4-35: portb register map for dspic33evxxxgmx04 devices table 4-36: portb register map for dspic33evxxxgmx02 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisb 0e14 trisb<15:0> df9f portb 0e16 rb<15:0> xxxx latb 0e18 latb<15:0> xxxx odcb 0e1a odcb<15:0> 0000 cnenb 0e1c cnieb<15:0> 0000 cnpub 0e1e cnpub<15:0> 0000 cnpdb 0e20 cnpdb<15:0> 0000 anselb 0e22 ansb<9:7> ansb<3:0> 010f sr1b 0e24 sr1b<9:7> s r 1 b 4 0000 sr0b 0e26 sr0b<9:7> s r 0 b 4 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisb 0e14 trisb<15:0> df9f portb 0e16 rb<15:0> xxxx latb 0e18 latb<15:0> xxxx odcb 0e1a odcb<15:0> 0000 cnenb 0e1c cnieb<15:0> 0000 cnpub 0e1e cnpub<15:0> 0000 cnpdb 0e20 cnpdb<15:0> 0000 anselb 0e22 ansb<9:7> ansb<3:0> 010f sr1b 0e24 sr1b<9:7> s r 1 b 4 0000 sr0b 0e26 sr0b<9:7> s r 0 b 4 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 65 dspic33evxxxgm00x/10x family table 4-37: portc register map for dspic33evxxxgmx06 devices table 4-38: portc register map for dspic33evxxxgmx04 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisc 0e28 trisc15 trisc<13:0> bfff portc 0e2a rc15 rc<13:0> xxxx latc 0e2c latc15 latc<13:0> xxxx odcc 0e2e odcc15 odcc<13:0> 0000 cnenc 0e30 cniec15 cniec<13:0> 0000 cnpuc 0e32 cnpuc15 cnpuc<13:0> 0000 cnpdc 0e34 cnpdc15 cnpdc<13:0> 0000 anselc 0e36 ansc<12:0> 1fff sr1c 0e38 sr1c<9:6> sr1c3 0000 sr0c 0e3a sr0c<9:6> sr0c3 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisc 0e28 t r i s c < 9 : 0 > bfff portc 0e2a rc<9:0> xxxx latc 0e2c l a t c < 9 : 0 > xxxx odcc 0e2e odcc<9:0> 0000 cnenc 0e30 cniec<9:0> 0000 cnpuc 0e32 cnpuc<9:0> 0000 cnpdc 0e34 cnpdc<9:0> 0000 anselc 0e36 ansc<9:0> 0807 sr1c 0e38 sr1c<9:6> sr1c3 0000 sr0c 0e3a sr0c<9:6> sr0c3 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 66 ? 2013-2015 microchip technology inc. table 4-39: portd register map for dspic33evxxxgmx06 devices table 4-40: porte register map for dspic33evxxxgmx06 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisd 0e3c t r i s d 8 t r i s d < 6 : 5 > 0160 portd 0e3e rd8 rd<6:5> xxxx latd 0e40 l a t d 8 l a t d < 6 : 5 > xxxx odcd 0e42 odcd8 odcd<6:5> 0000 cnend 0e44 cnied8 cnied<6:5> 0000 cnpud 0e46 cnpud8 cnpud<6:5> 0000 cnpdd 0e48 cnpdd8 cnpdd<6:5> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trise 0e50 trise<15:12> f000 porte 0e52 re<15:12> xxxx late 0e54 late<15:12> xxxx odce 0e56 odce<15:12> 0000 cnene 0e58 cniee<15:12> 0000 cnpue 0e5a cnpue<15:12> 0000 cnpde 0e5c cnpde<15:12> 0000 ansele 0e5e anse<15:12> f000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 67 dspic33evxxxgm00x/10x family table 4-41: portf register map for dspic33evxxxgmx06 devices table 4-42: portg register map for dspic33evxxxgmx06 devices sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisf 0e64 t r i s f < 1 : 0 > 0003 portf 0e66 r f < 1 : 0 > xxxx latf 0e68 l a t f < 1 : 0 > xxxx odcf 0e6a o d c f < 1 : 0 > 0000 cnenf 0e6c cnief<1:0> 0000 cnpuf 0e6e cnpuf<1:0> 0000 cnpdf 0e70 cnpdf<1:0> 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. sfr name addr. bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 all resets trisg 0e78 t r i s g < 9 : 6 > 03c0 portg 0e7a r g < 9 : 6 > xxxx latg 0e7c l a t g < 9 : 6 > xxxx odcg 0e7e odcg<9:6> 0000 cneng 0e80 c n i e g < 9 : 6 > 0000 cnpug 0e82 cnpug<9:6> 0000 cnpdg 0e84 cnpdg<9:6> 0000 anselg 0e86 a n s g < 9 : 6 > 0000 legend: x = unknown value on reset; = unimplemented, read as 0 . reset values are shown in hexadecimal. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 68 ? 2013-2015 microchip technology inc. 4.3.1 paged memory scheme the dspic33evxxxgm00x/10x family architecture extends the available ds through a paging scheme, which allows the available ds to be accessed using mov instructions in a linear fashion for pre- and post- modified effective addresses (eas). the upper half of the base data space address is used in conjunction with the data space page registers, the 10-bit data space read page register (dsrpag) or the 9-bit data space write page register (dswpag), to form an eds address, or program space visibility (psv) address. the data space page registers are located in the sfr space. construction of the eds address is shown in figure 4-9 and figure 4-10 . when dsrpag<9> = 0 and the base address bit, ea<15> = 1 , the dsrpag<8:0> bits are concatenated onto ea<14:0> to form the 24-bit eds read address. similarly, when the base address bit, ea<15> = 1 , the dswpag<8:0> bits are concatenated onto ea<14:0> to form the 24- bit eds write address. figure 4-9: extended data sp ace (eds) read address generation 1 dsrpag<8:0> 9 bits ea 15 bits select byte 24-bit eds ea select ea (dsrpag = dont care) no eds access select 16-bit ds ea byte ea<15> = 0 dsrpag 0 ea<15> note: ds read access when dsrpag = 0x000 will force an address error trap. = 1 ? dsrpag<9> y n generate psv address 0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 69 dspic33evxxxgm00x/10x family figure 4-10: extended data space (eds) write address generation the paged memory scheme provides access to multiple 32-kbyte windows in the eds and psv memory. the data space page registers, dsxpag, in combination with the upper half of the data space address, can provide up to 16 mbytes of additional address space in the eds and 8 mbytes (dsrpag only) of psv address space. the paged data memory space is shown in figure 4-11 . the program space (ps) can be accessed with a dsrpag of 0x200 or greater. only reads from ps are supported using the dsrpag. writes to ps are not supported, therefore, the dswpag is dedicated to ds, including eds. the data space and eds can be read from and written to using dsrpag and dswpag, respectively. 1 dswpag<8:0> 9 bits ea 15 bits byte 24-bit eds ea select ea (dswpag = dont care) no eds access select 16-bit ds ea byte ea<15> = 0 note: ds read access when dsrpag = 0x000 will force an address error trap. generate psv address 0 ea<15> downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 70 ? 2013-2015 microchip technology inc. figure 4-11: paged data memory space 0x0000 program memory 0x0000 0x7fff 0x7fff eds page 0x001 0x0000 sfr registers 0x0fff 0x1000 up to 8-kbyte 0x2fff local data space eds (dsrpag<9:0>/dswpag<8:0>) reserved (will produce an address error trap) 32-kbyte eds window 0xffff 0x3000 page 0 program space 0x00_0000 0x7f_ffff (lsw C <15:0>) 0x0000 (dsrpag = 0x001) (dswpag = 0x001) eds page 0x1ff (dsrpag = 0x1ff) (dswpag = 0x1ff) eds page 0x200 (dsrpag = 0x200) psv program memory eds page 0x2ff (dsrpag = 0x2ff) eds page 0x300 (dsrpag = 0x300) eds page 0x3ff (dsrpag = 0x3ff) 0x7fff 0x0000 0x7fff 0x0000 0x7fff 0x0000 0x7fff 0x0000 0x7fff ds_addr<14:0> ds_addr<15:0> (lsw) psv program memory (msb) table address space (tblpag<7:0>) program memory 0x00_0000 0x7f_ffff (msb C <23:16>) 0x0000 (tblpag = 0x00) 0xffff ds_addr<15:0> lsw using tblrdl / tblwtl , msb using tblrdh / tblwth 0x0000 (tblpag = 0x7f) 0xffff lsw using tblrdl / tblwtl , msb using tblrdh / tblwth (instruction & data) no writes allowed no writes allowed no writes allowed no writes allowed ram 0x7fff 0x8000 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 71 dspic33evxxxgm00x/10x family allocating different page registers for read and write access allows the architecture to support data movement between different pages in the data memory. this is accomplished by setting the dsrpag register value to the page from which you want to read, and configure the dswpag register to the page to which it needs to be written. data can also be moved from different psv to eds pages by configuring the dsrpag and dswpag registers to address psv and eds space, respectively. the data can be moved between pages by a single instruction. when an eds or psv page overflow or underflow occurs, ea<15> is cleared as a result of the register indirect ea calculation. an overflow or underflow of the ea in the eds or psv pages can occur at the page boundaries when: the initial address, prior to modification, addresses an eds or a psv page. the ea calculation uses pre- or post-modified register indirect addressing. however, this does not include register offset addressing. in general, when an overflow is detected, the dsxpag register is incremented and the ea<15> bit is set to keep the base address within the eds or psv window. when an underflow is detected, the dsxpag register is decremented and the ea<15> bit is set to keep the base address within the eds or psv window. this creates a linear eds and psv address space, but only when using the register indirect addressing modes. exceptions to the operation described above arise when entering and exiting the boundaries of page 0, eds and psv spaces. ta b l e 4 - 4 3 lists the effects of overflow and underflow scenarios at different boundaries. in the following cases, when an overflow or underflow occurs, the ea<15> bit is set and the dsxpag is not modified; therefore, the ea will wrap to the beginning of the current page: register indirect with register offset addressing modulo addressing bit-reversed addressing table 4-43: overflow and underflow scenarios at page 0, eds and psv space boundaries ( 2 , 3 , 4 ) o/u, r/w operation before after dsxpag ds ea<15> page description dsxpag ds ea<15> page description o, read [++wn] or [wn++] dsrpag = 0x1ff 1 eds: last page dsrpag = 0x1ff 0 see note 1 o, read dsrpag = 0x2ff 1 psv: last lsw page dsrpag = 0x300 1 psv: first msb page o, read dsrpag = 0x3ff 1 psv: last msb page dsrpag = 0x3ff 0 see note 1 o, write dswpag = 0x1ff 1 eds: last page dswpag = 0x1ff 0 see note 1 u, read [--wn] or [wn--] dsrpag = 0x001 1 psv page dsrpag = 0x001 0 see note 1 u, read dsrpag = 0x200 1 psv: first lsw page dsrpag = 0x200 0 see note 1 u, read dsrpag = 0x300 1 psv: first msb page dsrpag = 0x2ff 1 psv: last lsw page legend: o = overflow, u = underflow, r = read, w = write note 1: the register indirect addressing now addresses a location in the base data space (0x0000-0x8000). 2: an eds access with dsxpag = 0x000 will generate an address error trap. 3: only reads from ps are supported using dsrpag. an attempt to write to ps using dswpag will gener ate an address error trap. 4: pseudolinear addressing is not supported for large offsets. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 72 ? 2013-2015 microchip technology inc. 4.3.2 extended x data space the lower portion of the base address space range, between 0x0000 and 0x2fff, is always accessible regardless of the contents of the data space page registers; it is indirectly addressable through the register indirect instructions. it can be regarded as being located in the default eds page 0 (i.e., eds address range of 0x000000 to 0x002fff with the base address bit, ea<15> = 0 , for this address range). however, page 0 cannot be accessed through the upper 32 kbytes, 0x8000 to 0xffff, of base data space, in combination with dsrpag = 0x000 or dswpag = 0x000. consequently, the dsrpag and dswpag registers are initialized to 0x001 at reset. the remaining pages, including both eds and psv pages, are only accessible using the dsrpag or dswpag registers in combination with the upper 32 kbytes, 0x8000 to 0xffff, of the base address, where the base address bit, ea<15> = 1 . for example, when dsrpag = 0x001 or dswpag = 0x001, accesses to the upper 32 kbytes, 0x8000 to 0xffff of the data space, will map to the eds address range of 0x008000 to 0x00ffff. when dsrpag = 0x002 or dswpag = 0x002, accesses to the upper 32 kbytes of the data space will map to the eds address range of 0x010000 to 0x017fff and so on, as shown in the eds memory map in figure 4-12 . for more information on the psv page access using data space page registers, refer to section 5.0 program space visibility from data space in dspic33e/pic24e program memory (ds70000613) of the dspic33/pic24 family reference manual . figure 4-12: eds memory map note 1: dsxpag should not be used to access page 0. an eds access with dsxpag set to 0x000 will generate an address error trap. 2: clearing the dsxpag in software has no effect. 0x0080000x010000 0x018000 page 3 page 2 page 1fd 0xfe8000 0xff0000 0xff8000 page 1ff page 1fe sfr/ds 0x0000 0xffff eds ea address (24 bits) ds conventional ea<15:0> 0x8000 (page 0) (dsrpag<8:0>, ea<14:0>) (dswpag<8:0>, ea<14:0>) page 1 dsrpag<9> = 0 ds address downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 73 dspic33evxxxgm00x/10x family 4.3.3 data memory arbitration and bus master priority eds accesses from bus masters in the system are arbitrated. the arbiter for data memory (including eds) arbitrates between the cpu, the dma and the mplab ? icd module. in the event of coincidental access to a bus by the bus masters, the arbiter determines which bus master access has the highest priority. the other bus masters are suspended and processed after the access of the bus by the bus master with the highest priority. by default, the cpu is bus master 0 (m0) with the highest priority and the mplab icd is bus master 4 (m4) with the lowest priority. the remaining bus master (dma controller) is allocated to m3 (m1 and m2 are reserved and cannot be used). the user application may raise or lower the priority of the dma controller to be above that of the cpu by setting the appropriate bits in the eds bus master priority control (mstrpr) register. all bus masters with raised priorities will maintain the same priority relationship relative to each other (i.e., m1 being highest and m3 being lowest, with m2 in between). also, all the bus masters with priorities below that of the cpu maintain the same priority relationship relative to each other. the priority schemes for bus masters with different mstrpr values are listed in ta b l e 4 - 4 4 . figure 4-13 shows the arbiter architecture. the bus master priority control allows the user application to manipulate the real-time response of the system, either statically during initialization or dynamically in response to real-time events. table 4-44: data memory bus arbiter priority figure 4-13: arbiter architecture priority mstrpr<15:0> bit setting ( 1 ) 0x0000 0x0020 m0 (highest) cpu dma m1 reserved cpu m2 reserved reserved m3 dma reserved m4 (lowest) mplab ? icd mplab icd note 1: all other values of mstrpr<15:0> are reserved. mplab ? icd reserved data memory arbiter m0 m1 m2 m3 m4 mstrpr<15:0> dma cpu sram downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 74 ? 2013-2015 microchip technology inc. 4.3.4 software stack the w15 register serves as a dedicated software stack pointer (ssp) and is automatically modified by exception processing, subroutine calls and returns; however, w15 can be referenced by any instruction in the same manner as all other w registers. this simpli- fies reading, writing and manipulating the ssp (for example, creating stack frames). w15 is initialized to 0x1000 during all resets. this address ensures that the ssp points to valid ram in all dspic33evxxxgm00x/10x family devices and per- mits stack availability for non-maskable trap exceptions. these can occur before the ssp is initialized by the user software. you can reprogram the ssp during initialization to any location within the data space. the ssp always points to the first available free word and fills the software stack, working from lower toward higher addresses. figure 4-14 illustrates how it pre- decrements for a stack pop (read) and post-increments for a stack push (writes). when the pc is pushed onto the stack, pc<15:0> are pushed onto the first available stack word, then pc<22:16> are pushed into the second available stack location. for a pc push during any call instruction, the msb of the pc is zero-extended before the push, as shown in figure 4-14 . during exception processing, the msb of the pc is concatenated with the lower 8 bits of the cpu status register (sr). this allows the contents of srl to be preserved automatically during interrupt processing. figure 4-14: call stack frame 4.4 instruction addressing modes the addressing modes shown in table 4-45 form the basis of the addressing modes optimized to support the specific features of the individual instructions. the addressing modes provided in the mac class of instructions differ from those in the other instruction types. 4.4.1 file register instructions most file register instructions use a 13-bit address field (f) to directly address data present in the first 8192 bytes of data memory (near data space). most file register instructions employ a working register, w0, which is denoted as wreg in these instructions. the destination is typically either the same file register or wreg (with the exception of the mul instruction), which writes the result to a register or register pair. the mov instruction allows additional flexibility and can access the entire data space. 4.4.2 mcu instructions the three-operand mcu instructions are of the form: operand 3 = operand 1 operand 2 where, operand 1 is always a working register (that is, the addressing mode can only be register direct), which is referred to as wb. operand 2 can be a w register fetched from data memory or a 5-bit literal. the result location can be either a w register or a data memory location. the following addressing modes are supported by mcu instructions: register direct register indirect register indirect post-modified register indirect pre-modified 5-bit or 10-bit literal note: to protect against misaligned stack accesses, w15<0> is fixed to 0 by the hardware. note 1: to maintain system ssp (w15) coherency, w15 is never subject to (eds) paging, and is therefore, restricted to an address range of 0x0000 to 0xffff. the same applies to the w14 when used as a stack frame pointer (sfa = 1 ). 2: as the stack can be placed in, and can access x and y spaces, care must be taken regarding its use, particularly with regard to local automatic variables in a c development environment. note: not all instructions support all of the addressing modes given above. individual instructions can support different subsets of these addressing modes. pc<15:0> b000000000 0 15 w15 (before call ) w15 (after call ) stack grows toward higher address 0x0000 pc<22:16> call subr downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 75 dspic33evxxxgm00x/10x family table 4-45: fundamental addressing modes supported 4.4.3 move and accumulator instructions move instructions and the dsp accumulator class of instructions provide a greater addressing flexibility than other instructions. in addition to the addressing modes supported by most mcu instructions, move and accu- mulator instructions also support register indirect with register offset addressing mode, also referred to as register indexed mode. in summary, the following addressing modes are supported by move and accumulator instructions: register direct register indirect register indirect post-modified register indirect pre-modified register indirect with register offset (indexed) register indirect with literal offset 8-bit literal 16-bit literal 4.4.4 mac instructions the dual source operand dsp instructions ( clr , ed , edac , mac , mpy , mpy.n , movsac and msc ), also referred to as mac instructions, use a simplified set of addressing modes to allow the user application to effectively manipulate the data pointers through register indirect tables. the two-source operand prefetch registers must be members of the set, {w8, w9, w10, w11}. for data reads, w8 and w9 are always directed to the x ragu, and w10 and w11 are always directed to the y agu. the effective addresses generated (before and after modification) must, therefore, be valid addresses within x data space for w8 and w9, and y data space for w10 and w11. in summary, the following addressing modes are supported by the mac class of instructions: register indirect register indirect post-modified by 2 register indirect post-modified by 4 register indirect post-modified by 6 register indirect with register offset (indexed) 4.4.5 other instructions besides the addressing modes outlined previously, some instructions use literal constants of various sizes. for example, bra (branch) instructions use 16-bit signed literals to specify the branch destination directly, whereas the disi instruction uses a 14-bit unsigned literal field. in some instructions, such as ulnk , the source of an operand or result is implied by the opcode itself. certain operations, such as a nop , do not have any operands. addressing mode description file register direct the address of the file register is specified explicitly. register direct the contents of a register are accessed directly. register indirect the contents of wn form the effective address (ea). register indirect post-modified the contents of wn form the ea. wn is post-modified (incremented or decremented) by a constant value. register indirect pre-modified wn is pre-modified (incremented or decremented) by a signed constant value to form the ea. register indirect with register offset (register indexed) the sum of wn and wb forms the ea. register indirect with literal offset the sum of wn and a literal forms the ea. note: for the mov instructions, the addressing mode specified in the instruction can differ for the source and destination ea. how- ever, the 4-bit wb (register offset) field is shared by both source and destination (but typically only used by one). note: not all instructions support all the addressing modes given above. individual instructions may support different subsets of these addressing modes. note: register indirect with register offset addressing mode is available only for w9 (in x data space) and w11 (in y data space). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 76 ? 2013-2015 microchip technology inc. 4.5 modulo addressing modulo addressing mode is a method of providing an automated means to support circular data buffers using hardware. the objective is to remove the need for software to perform data address boundary checks when executing tightly looped code, as is typical in many dsp algorithms. modulo addressing can operate in either data or program space (since the data pointer mechanism is essentially the same for both). one circular buffer can be supported in each of the x (which also provides the pointers into program space) and y data spaces. modulo addressing can operate on any w register pointer. however, it is not advisable to use w14 or w15 for modulo addressing, since these two registers are used as the sfp and ssp, respectively. in general, any particular circular buffer can be config- ured to operate in only one direction, as there are certain restrictions on the buffer start address (for incrementing buffers) or end address (for decrementing buffers), based upon the direction of the buffer. the only exception to the usage restrictions is for buffers that have a power-of-two length. as these buffers satisfy the start and end address criteria, they can operate in a bidirectional mode (that is, address boundary checks are performed on both the lower and upper address boundaries). 4.5.1 start and end address the modulo addressing scheme requires that a starting and ending address be specified and loaded into the 16-bit modulo buffer address registers: xmodsrt, xmodend, ymodsrt and ymodend (see tab l e 4 - 1 ). the length of a circular buffer is not directly specified. it is determined by the difference between the corre- sponding start and end addresses. the maximum possible length of the circular buffer is 32k words (64 kbytes). 4.5.2 w address register selection the modulo and bit-reversed addressing control register, modcon<15:0>, contains enable flags, as well as a w register field to specify the w address registers. the xwm and ywm fields select the registers that operate with modulo addressing: if xwm = 1111 , x ragu and x wagu modulo addressing is disabled if ywm = 1111 , y agu modulo addressing is disabled the x address space pointer w register (xwm) to which modulo addressing is to be applied is stored in modcon<3:0> (see table 4-1 ). modulo addressing is enabled for x data space when xwm is set to any value other than 1111 and the xmoden bit (modcon<15>) is set the y address space pointer w register (ywm) to which modulo addressing is to be applied is stored in modcon<7:4>. modulo addressing is enabled for y data space when ywm is set to any value other than 1111 and the ymoden bit (modcon<14>) is set. figure 4-15 shows an example of modulo addressing operation. figure 4-15: modulo address ing operation example note: y data space modulo addressing ea calculations assume word-sized data (lsb of every ea is always clear). 0x1100 0x1163 start addr = 0x1100 end addr = 0x1163 length = 32 words byte address mov #0x1100, w0 mov w0, xmodsrt ;set modulo start address mov #0x1163, w0 mov w0, modend ;set modulo end address mov #0x8001, w0 mov w0, modcon ;enable w1, x agu for modulo mov #0x0000, w0 ;w0 holds buffer fill value mov #0x1110, w1 ;point w1 to buffer do again, #0x31 ;fill the 50 buffer locations mov w0, [w1++] ;fill the next location again: inc w0, w0 ;increment the fill value downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 77 dspic33evxxxgm00x/10x family 4.5.3 modulo addressing applicability modulo addressing can be applied to the effective address (ea) calculation associated with any w register. address boundaries check for addresses equal to: the upper boundary addresses for incrementing buffers the lower boundary addresses for decrementing buffers the address boundaries check for addresses less than or greater than the upper (for incrementing buffers) and lower (for decrementing buffers) boundary addresses (not just equal to). address changes can, therefore, jump beyond boundaries and still be adjusted correctly. 4.6 bit-reversed addressing bit-reversed addressing mode is intended to simplify data reordering for radix-2 fft algorithms. it is supported by the x agu for data writes only. the modifier, which can be a constant value or register contents, is regarded as having its bit order reversed. the address source and destination are kept in normal order. thus, the only operand requiring reversal is the modifier. 4.6.1 bit-reversed addressing implementation bit-reversed addressing mode is enabled when all of these conditions are met: bwm<3:0> bits (w register selection) in the modcon register are any value other than 1111 (the stack cannot be accessed using bit-reversed addressing) the bren bit is set in the xbrev register the addressing mode used is register indirect with pre-increment or post-increment if the length of a bit-reversed buffer is m = 2 n bytes, the last n bits of the data buffer start address must be zeros. xb<14:0> is the bit-reversed addressing modifier, or pivot point, which is typically a constant. in the case of an fft computation, its value is equal to half of the fft data buffer size. when enabled, bit-reversed addressing is executed only for register indirect with pre-increment or post- increment addressing and word-sized data writes. it does not function for any other addressing mode or for byte-sized data and normal addresses are generated instead. when bit-reversed addressing is active, the w address pointer is always added to the address modifier (xb) and the offset associated with the regis- ter indirect addressing mode is ignored. in addition, as word-sized data is a requirement, the lsb of the ea is ignored (and always clear). if bit-reversed addressing has already been enabled by setting the bren (xbrev<15>) bit, a write to the xbrev register should not be immediately followed by an indirect read operation using the w register that has been designated as the bit-reversed pointer. the operation of bit-reversed addressing is shown in figure 4-16 and tab l e 4 - 46 . note: the modulo corrected effective address is written back to the register only when pre-modify or post-modify addressing mode is used to compute the effective address. when an address offset, such as [w7 + w2] is used, modulo addressing correction is performed, but the contents of the register remain unchanged. note: all bit-reversed ea calculations assume word-sized data (lsb of every ea is always clear). the xb value is scaled accordingly to generate compatible (byte) addresses. note: modulo addressing and bit-reversed addressing can be enabled simultaneously using the same w register, but bit- reversed addressing operation will always take precedence for data writes when enabled. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 78 ? 2013-2015 microchip technology inc. figure 4-16: bit-reversed addressing example table 4-46: bit-reversed addres sing sequence (16-entry) normal address bi t-reversed address a3 a2 a1 a0 decimal a3 a2 a1 a0 decimal 0000 0 0000 0 0001 1 1000 8 0010 2 0100 4 0011 3 1100 12 0100 4 0010 2 0101 5 1010 10 0110 6 0110 6 0111 7 1110 14 1000 8 0001 1 1001 9 1001 9 1010 10 0101 5 1011 11 1101 13 1100 12 0011 3 1101 13 1011 11 1110 14 0111 7 1111 15 1111 15 b3 b2 b1 0 b2 b3 b4 0 bit locations swapped left-to-right around center of binary value bit-reversed address xb = 0x0008 for a 16-word bit-reversed buffer b7 b6 b5 b1 b7 b6 b5 b4 b11 b10 b9 b8 b11 b10 b9 b8 b15 b14 b13 b12 b15 b14 b13 b12 sequential address pivot point downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 79 dspic33evxxxgm00x/10x family 4.7 interfacing program and data memory spaces the dspic33evxxxgm00x/10x family architecture uses a 24-bit wide program space and a 16-bit wide data space. the architecture is also a modified harvard scheme, meaning that data can also be present in the program space. to use this data successfully, it must be accessed in a way that preserves the alignment of information in both the spaces. aside from normal execution, the architecture of the dspic33evxxxgm00x/10x family devices provides two methods by which program space can be accessed during operation: using table instructions to access individual bytes or words anywhere in the program space remapping a portion of the program space into the data space (program space visibility) table instructions allow an application to read or write to small areas of the program memory. this capability makes the method ideal for accessing data tables that need to be updated periodically. it also allows access to all bytes of the program word. the remapping method allows an application to access a large block of data on a read-only basis, which is ideal for look-ups from a large table of static data. the application can only access the least significant word of the program word. table 4-47 shows the construction of the program space address. how the data is accessed from program space is shown in figure 4-17 . table 4-47: program space address construction access type access space program space address <23> <22:16> <15> <14:1> <0> instruction access (code execution) user 0 pc<22:1> 0 0xx xxxx xxxx xxxx xxxx xxx0 tblrd/tblwt (byte/word read/write) user tblpag<7:0> data ea<15:0> 0xxx xxxx xxxx xxxx xxxx xxxx configuration tblpag<7:0> data ea<15:0> 1xxx xxxx xxxx xxxx xxxx xxxx downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 80 ? 2013-2015 microchip technology inc. figure 4-17: data access from program space address generation 0 program counter 23 bits program counter (1) tblpag 8 bits ea 16 bits byte select 0 1/0 user/configuration table operations (2) space select 24 bits 1/0 note 1: the least significant bit (lsb) of program space addresses is always fixed as 0 to maintain word alignment of data in the program and data spaces. 2: table operations are not required to be word-aligned. t able read operations are permitted in the configuration memory space. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 81 dspic33evxxxgm00x/10x family 4.7.1 data access from program memory using table instructions the tblrdl and tblwtl instructions offer a direct method of reading or writing the lower word of any address within the program space without going through the data space. the tblrdh and tblwth instructions are the only method to read or write the upper 8 bits of a program space word as data. the pc is incremented by two for each successive 24-bit program word. this allows program memory addresses to directly map to data space addresses. program memory can thus be regarded as two 16-bit wide word address spaces, residing side by side, each with the same address range. the tblrdl and tblwtl instructions access the space that contains the least significant data word. tblrdh and tblwth access the space that contains the upper data byte. two table instructions are provided to move byte or word-sized (16-bit) data to and from program space. both function as either byte or word operations. tblrdl (table read low): - in word mode, this instruction maps the lower word of the program space location (p<15:0>) to a data address (d<15:0>). - in byte mode, either the upper or lower byte of the lower program word is mapped to the lower byte of a data address. the upper byte is selected when byte select is 1 ; the lower byte is selected when it is 0 . tblrdh (table read high): - in word mode, this instruction maps the entire upper word of a program address (p<23:16>) to a data address. the phantom byte (d<15:8>) is always 0 . - in byte mode, this instruction maps the upper or lower byte of the program word to d<7:0> of the data address, as in the tblrdl instruction. the data is always 0 when the upper phantom byte is selected (byte select = 1 ). similarly, two table instructions, tblwth and tblwtl , are used to write individual bytes or words to a program space address. the details of their operation are explained in section 5.0 flash program memory . for all table operations, the area of program memory space to be accessed is determined by the table page register (tblpag). tblpag covers the entire program memory space of the device, including user application and configuration spaces. when tblpag<7> = 0 , the table page is located in the user memory space. when tblpag<7> = 1 , the page is located in configuration space. accessing the program memory with table instructions is shown in figure 4-18 . figure 4-18: accessing program memory with table instructions 0 8 16 23 00000000 00000000 00000000 00000000 phantom byte tblrdh.b (wn<0> = 0 ) tblrdl.w tblrdl.b (wn<0> = 1 ) tblrdl.b (wn<0> = 0 ) 23 15 0 tblpag 02 0x000000 0x800000 0x020000 0x030000 program space the address for the table operation is determined by the data ea within the page defined by the tblpag register. only read operations are shown; write operations are also valid in the user memory area. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 82 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 83 dspic33evxxxgm00x/10x family 5.0 flash program memory the dspic33evxxxgm00x/10x family devices contain internal flash program memory for storing and executing application code. the memory is readable, writable and erasable during normal operation over the entire v dd range. the flash memory can be programmed in the following three ways: in-circuit serial programming? (icsp?) run-time self-programming (rtsp) enhanced in-circuit serial programming (enhanced icsp) icsp allows for a dspic33evxxxgm00x/10x family device to be serially programmed while in the end application circuit. this is done with two lines for programming clock and programming data (pgecx/ pgedx) lines, and three other lines for power (v dd ), ground (v ss ) and master clear (mclr ). this allows customers to manufacture boards with unprogrammed devices and then program the device just before shipping the product. this also allows the most recent firmware or a custom firmware to be programmed. enhanced icsp uses an on-board bootloader, known as the program executive (pe), to manage the programming process. using an spi data frame format, the program executive can erase, program and verify program memory. for more information on enhanced icsp, refer to the specific device programming specification. rtsp is accomplished using the tblrd (table read) and tblwt (table write) instructions. with rtsp, the user application can write program memory data as a double program memory word, a row of 64 instructions (192 bytes) and erase program memory in blocks of 512 instruction words (1536 bytes) at a time. 5.1 table instructions and flash programming the flash memory read and the double-word programming operations make use of the tblrd and tblwt instructions, respectively. these allow direct read and write access to the program memory space from the data memory while the device is in normal operating mode. the 24-bit target addr ess in the program memory is formed using bits<7:0> of the tblpag register and the effective address (ea) from a w register, specified in the table instruction, as shown in figure 5-1 . the tblrdl and the tblwtl instructions are used to read or write to bits<15:0> of the program memory. tblrdl and tblwtl can access program memory in both word and byte modes. the tblrdh and tblwth instructions are used to read or write to bits<23:16> of the program memory. tblrdh and tblwth can also access program memory in word or byte mode. figure 5-1: addressing for table registers note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/ 10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to flash pro- gramming (ds70609) in the dspic33/ pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. 0 program counter 24 bits program counter tblpag reg 8 bits working reg ea 16 bits byte 24-bit ea 0 1/0 select using table instruction using user/configuration space select downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 84 ? 2013-2015 microchip technology inc. 5.2 rtsp operation rtsp allows the user application to erase a single page of memory, program a row and to program two instruction words at a time. see tab le 1 in the dspic33evxxxgm00x/10x product families section for the page sizes of each device. the flash program memory array is organized into rows of 64 instructions or 192 bytes. rtsp allows the user application to erase a page of program memory, which consists of eight rows (512 instructions) at a time, and to program one row or two adjacent words at a time. the 8-row erase pages and single row write rows are edge-aligned, from the beginning of program memory, on boundaries of 1536 bytes and 192 bytes, respectively. table 30-13 in section 30.0 electrical characteristics lists the typical erase and programming times. the basic sequence for rtsp word programming is to use the tblwtl and tblwth instructions to load two of the 24-bit instructions into the write latches found in configuration memory space. see figure 4-1 to figure 4-5 for write latch addresses. programming is performed by unlocking and setting the control bits in the nvmcon register. row programming is performed by loading 192 bytes into data memory and then loading the address of the first byte in that row into the nvmsrcadr register. once the write has been initiated, the device will auto- matically load the write latches and increment the nvmsrcadr and the nvmadr(u) registers until all bytes have been programmed. the rpdf bit (nvmcon<9>) selects the format of the stored data in ram to be either compressed or uncompressed. see figure 5-2 for data formatting. compressed data helps to reduce the amount of required ram by using the upper byte of the second word for the msb of the second instruction. for more information on erasing and programming the flash memory, refer to flash programming (ds70609) in the dspic33/pic24 family reference manual . figure 5-2: uncompressed/ compressed format 5.3 programming operations a complete programming sequence is necessary for programming or erasing the internal flash in rtsp mode. the processor stalls (waits) until the program- ming operation is finished. setting the wr bit (nvmcon<15>) starts the operation and the wr bit is automatically cleared when the operation is finished. 5.3.1 programming algorithm for flash program memory programmers can program two adjacent words (24 bits x 2) of program flash memory at a time on every other word address boundary (0x000002, 0x000006, 0x00000a, etc.). to do this, erase the page that contains the desired address of the location the user wants to change. for protection against accidental operations, the write initiate sequence for nvmkey must be used to allow any erase or program operation to proceed. after the programming command has been executed, the user application must wait for the pro- gramming time until programming is complete. the two instructions following the start of the programming sequence should be nop s. refer to flash programming (ds70609) in the dspic33/pic24 family reference manual for details and code examples on programming using rtsp. note 1: before reprogramming either of the two words in a double-word pair, the user must erase the flash memory page in which it is located. 2: before reprogramming any word in a row, the user must erase the flash memory page in which it is located. lsw1 msb1 0x00 lsw2 0x00 msb2 lsw1 msb1 msb2 lsw2 15 7 0 15 7 0 even byte address even byte address increasing address increasing address uncompressed format (rpdf = 0 ) compressed format (rpdf = 1 ) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 85 dspic33evxxxgm00x/10x family 5.4 error correcting code (ecc) in order to improve program memory performance and durability, these devices include error correcting code functionality (ecc) as an integral part of the flash memory controller. ecc can determine the presence of single-bit errors in program data, including which bit is in error, and correct the data automatically without user intervention. ecc cannot be disabled. when data is written to program memory, ecc generates a 7-bit hamming code parity value for every two (24-bit) instruction words. the data is stored in blocks of 48 data bits and 7 parity bits; parity data is not memory-mapped and is inaccessible. when the data is read back, the ecc calculates the parity on it and compares it to the previously stored parity value. if a parity mismatch occurs, there are two possible outcomes: single-bit errors are automatically identified and corrected on read-back. an optional device-level interrupt (eccsbeif) is also generated. double-bit errors will generate a generic hard trap and the read data is not changed. if special exception handling for the trap is not implemented, a device reset will also occur. to use the single-bit error interrupt, set the ecc single- bit error interrupt enable bit (eccsbeie) and configure the eccsbeip bits to set the appropriate interrupt priority. except for the single-bit error interrupt, error events are not captured or counted by hardware. this functionality can be implemented in the software application, but it is the users responsibility to do so. 5.5 flash memory resources many useful resources are provided on the main product page of the microchip web site for the devices listed in this data sheet. this product page contains the latest updates and additional information. 5.5.1 key resources code samples application notes software libraries webinars all related dspic33/pic24 family reference manual sections development tools 5.6 control registers the following five sfrs are used to read and write the program flash memory: nvmcon, nvmkey, nvmadr, nvmadru and nvmsrcadr. the nvmcon register ( register 5-1 ) selects the operation to be performed (page erase, word/row program, inactive panel erase) and initiates the program/erase cycle. nvmkey ( register 5-4 ) is a write-only register that is used for write protection. to start a programming or erase sequence, the user application must consecutively write 0x55 and 0xaa to the nvmkey register. there are two nvm address registers: nvmadru and nvmadr. these two registers, when concatenated, form the 24-bit effective address (ea) of the selected word/row for programming operations or the selected page for erase operations. the nvmadru register is used to hold the upper 8 bits of the ea, while the nvmadr register is used to hold the lower 16 bits of the ea. for row programming operation, data to be written to program flash memory is written into data memory space (ram) at an address defined by the nvmsrcadr register (location of the first element in row programming data). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 86 ? 2013-2015 microchip technology inc. register 5-1: nvmcon: nonvolatil e memory (nvm) control register r/so-0 r/w-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 wr ( 1 ) wren ( 1 ) wrerr ( 1 ) nvmsidl ( 2 ) rpdf urerr bit 15 bit 8 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 n v m o p 3 ( 1,3,4 ) nvmop2 ( 1,3,4 ) nvmop1 ( 1,3,4 ) nvmop0 ( 1,3,4 ) bit 7 bit 0 legend: so = settable only bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 wr: write control bit ( 1 ) 1 = initiates a flash memory program or erase operation; the operation is self-timed and the bit is cleared by hardware once the operation is complete 0 = program or erase operation is complete and inactive bit 14 wren: write enable bit ( 1 ) 1 = flash program or erase operations are enabled 0 = flash program or erase operations are inhibited bit 13 wrerr: write sequence error flag bit ( 1 ) 1 = an improper program or erase sequence attempt, or termination has occurred (bit is set automati cally on any set attempt of the wr bit) 0 = the program or erase operation completed normally bit 12 nvmsidl: nvm stop in idle control bit ( 2 ) 1 = primary flash operation discontinues when the device enters idle mode 0 = primary flash operation continues when the device enters idle mode. bit 11-10 unimplemented: read as 0 bit 9 rpdf: row programming data format control bit 1 = row data to be stored in ram is in a compressed format 0 = row data to be stored in ram is in an uncompressed format bit 8 urerr: row programming data underrun error flag bit 1 = row programming operation has been terminated due to a data underrun error 0 = no data underrun has occurred bit 7-4 unimplemented: read as 0 note 1: these bits can only be reset on a por. 2: if this bit is set, there will be minimal power savings (i idle ), and upon exiting idle mode, there is a delay (t vreg ) before flash memory becomes operational. 3: all other combinations of nvmop<3:0> are unimplemented. 4: execution of the pwrsav instruction is ignored while any of the nvm operations are in progress. 5: two adjacent words on a 4-word boundary are programmed during execution of this operation. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 87 dspic33evxxxgm00x/10x family bit 3-0 nvmop<3:0>: nvm operation select bits ( 1,3,4 ) 1111 = reserved 1110 = user memory and executive memory bulk erase operation 1101 = reserved 1100 = reserved 1011 = reserved 1010 = reserved 1001 = reserved 1000 = reserved 0111 = reserved 0101 = reserved 0100 = reserved 0011 = memory page erase operation 0010 = memory row program operation 0001 = memory double-word ( 5 ) 0000 = reserved register 5-1: nvmcon: nonv olatile memory (nvm) cont rol register (continued) note 1: these bits can only be reset on a por. 2: if this bit is set, there will be minimal power savings (i idle ), and upon exiting idle mode, there is a delay (t vreg ) before flash memory becomes operational. 3: all other combinations of nvmop<3:0> are unimplemented. 4: execution of the pwrsav instruction is ignored while any of the nvm operations are in progress. 5: two adjacent words on a 4-word boundary are programmed during execution of this operation. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 88 ? 2013-2015 microchip technology inc. register 5-2: nvmadru: nonvolatil e memory upper address register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmadru<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 nvmadru<23:16>: nvm memory upper write address bits selects the upper 8 bits of the location to program or erase in program flash memory. this regi ster may be read or written to by the user application. register 5-3: nvmadr: nonvolatil e memory lower address register r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmadr<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmadr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 nvmadr<15:0>: nvm memory lower write address bits selects the lower 16 bits of the location to program or erase in prog ram flash memory. this register may be read or written to by the user application. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 89 dspic33evxxxgm00x/10x family register 5-4: nvmkey: nonvolatile memory key register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 w-0 w-0 w-0 w-0 w-0 w-0 w-0 w-0 nvmkey<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 nvmkey<7:0>: nvm key register bits (write-only) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 90 ? 2013-2015 microchip technology inc. register 5-5: nvmsrcadrh: nvm data memory upper address register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmsrcadr<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 nvmsrcadrh<23:16>: data memory upper address bits register 5-6: nvmsrcadrl: nvm data memory lower address register r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x nvmsrcadr<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r-0 nvmsrcadr<7:1> bit 7 bit 0 legend: r = reserved bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-1 nvmsrcadrl<15:1>: data memory lower address bits bit 0 reserved: maintain as 0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 91 dspic33evxxxgm00x/10x family 6.0 resets the reset module combines all reset sources and controls the device master reset signal, sysrst . the following is a list of device reset sources: por: power-on reset bor: brown-out reset mclr : master clear pin reset swr: reset instruction wdto: watchdog timer time-out reset cm: configuration mismatch reset trapr: trap conflict reset iopuwr: illegal condition device reset - illegal opcode reset - uninitialized w register reset - security reset - illegal address mode reset a simplified block diagram of the reset module is shown in figure 6-1 . any active source of reset will make the sysrst signal active. on system reset, some of the registers associated with the cpu and peripherals are forced to a known reset state and some are unaffected. all types of device reset set a corresponding status bit in the rcon register to indicate the type of reset (see register 6-1 ). a por clears all the bits, except for the por and bor bits (rcon<1:0>) that are set. the user application can set or clear any bit at any time during code execution. the rcon bits only serve as status bits. setting a particular reset status bit in software does not cause a device reset to occur. the rcon register also has other bits associated with the watchdog timer and device power-saving states. the function of these bits is discussed in the other sections of this device data sheet. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to reset (ds70602) in the dspic33/pic24 family reference man- ual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: refer to the specific peripheral section or section 4.0 memory organization of this device data sheet for register reset states. note: the status bits in the rcon register should be cleared after they are read. therefore, the next rcon register value after a device reset is meaningful. note: in all types of resets, to select the device clock source, the contents of osccon are initialized from the fnoscx configuration bits in the foscsel configuration register. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 92 ? 2013-2015 microchip technology inc. figure 6-1: reset sy stem block diagram mclr v dd bor sleep or idle reset instruction wdt module glitch filter trap conflict illegal opcode uninitialized w register sysrst por configuration mismatch security reset internal regulator illegal address mode reset v dd rise detect downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 93 dspic33evxxxgm00x/10x family register 6-1: rcon: re set control register ( 1 ) r/w-0 r/w-0 u-0 u-0 r/w-0 u-0 r/w-0 r/w-0 trapr iopuwr v r e g s f c mv r e g s bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-1 extr swr swdten ( 2 ) wdto sleep idle bor por bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 trapr: trap reset flag bit 1 = a trap conflict reset has occurred 0 = a trap conflict reset has not occurred bit 14 iopuwr: illegal opcode or uninitialized w register access reset flag bit 1 = an illegal opcode detection or an illegal address mode, or uninitialized w register used as an address pointer caused a reset 0 = an illegal opcode reset or uninitialized w register reset has not occurred bit 13-12 unimplemented: read as 0 bit 11 vregsf: flash voltage regulator standby during sleep bit 1 = flash voltage regulator is active during sleep mode 0 = flash voltage regulator goes into standby mode during sleep mode bit 10 unimplemented: read as 0 bit 9 cm: configuration mismatch flag bit 1 = a configuration mismatch reset has occurred. 0 = a configuration mismatch reset has not occurred bit 8 vregs: voltage regulator standby during sleep bit 1 = voltage regulator is active during sleep 0 = voltage regulator goes into standby mode during sleep bit 7 extr: external reset (mclr ) pin bit 1 = a master clear (pin) reset has occurred 0 = a master clear (pin) reset has not occurred bit 6 swr: software reset (instruction) flag bit 1 = a reset instruction has been executed 0 = a reset instruction has not been executed bit 5 swdten: software enable/disable of wdt bit ( 2 ) 1 = wdt is enabled 0 = wdt is disabled bit 4 wdto: watchdog timer time-out flag bit 1 = wdt time-out has occurred 0 = wdt time-out has not occurred note 1: all of the reset status bits can be set or cleared in software. setting one of these bits in software d oes not cause a device reset. 2: if the fwdten<1:0> configuration bits are 11 (unprogrammed), the wdt is always enabled, regardless of the swdten bit setting. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 94 ? 2013-2015 microchip technology inc. bit 3 sleep: wake-up from sleep flag bit 1 = device has been in sleep mode 0 = device has not been in sleep mode bit 2 idle: wake-up from idle flag bit 1 = device was in idle mode 0 = device was not in idle mode bit 1 bor: brown-out reset flag bit 1 = a brown-out reset has occurred 0 = a brown-out reset has not occurred bit 0 por: power-on reset flag bit 1 = a power-on reset has occurred 0 = a power-on reset has not occurred register 6-1: rcon: re set control register ( 1 ) (continued) note 1: all of the reset status bits can be set or cleared in software. setting one of these bits in software d oes not cause a device reset. 2: if the fwdten<1:0> configuration bits are 11 (unprogrammed), the wdt is always enabled, regardless of the swdten bit setting. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 95 dspic33evxxxgm00x/10x family 7.0 interrupt controller the dspic33evxxxgm00x/10x family interrupt con- troller reduces the numerous peripheral interrupt request signals to a single interrupt request signal to the dspic33evxxxgm00x/10x cpu. the interrupt vector table (ivt) provides 246 interrupt sources (unused sources are reserved for future use) that can be programmed with different priority levels. the interrupt controller has the following features: interrupt vector table with up to 246 vectors alternate interrupt vector table (aivt) up to eight processor exceptions and software traps seven user-selectable priority levels interrupt vector table (ivt) with a unique vector for each interrupt or exception source fixed priority within a specified user priority level fixed interrupt entry and return latencies software can generate any peripheral interrupt alternate interrupt vector table (aivt) is available if boot security is enabled and aivten = 1 7.1 interrupt vector table the dspic33evxxxgm00x/10x family ivt, shown in figure 7-2 , resides in program memory, starting at location, 000004h. the ivt contains seven non- maskable trap vectors and up to 187 sources of interrupt. in general, each interrupt source has its own vector. each interrupt vector contains a 24-bit wide address. the value programmed into each interrupt vector location is the starting address of the associated interrupt service routine (isr). interrupt vectors are prioritized in terms of their natural priority. this priority is linked to their position in the vector table. lower addresses generally have a higher natural priority. for example, the interrupt associated with vector 0 takes priority over interrupts at any other vector address. 7.2 alternate interrupt vector table the alternate interrupt vector table (aivt), shown in figure 7-1 , is available if the boot segment (bs) is defined, the aivten bit is set in the intcon2 register and if the aivtdis configuration bit is set to 1 . the aivt begins at the start of the last page of the boot segment. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to interrupts (ds70000600) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 96 ? 2013-2015 microchip technology inc. figure 7-1: dspic33evxxxgm00x/10x fami ly alternate interrupt vector table ivt reserved bslim<12:0> ( 1 ) + 0x000000 reserved bslim<12:0> ( 1 ) + 0x000002 oscillator fail trap vector bslim<12:0> ( 1 ) + 0x000004 address error trap vector bslim<12:0> ( 1 ) + 0x000006 generic hard trap vector bslim<12:0> ( 1 ) + 0x000008 stack error trap vector bslim<12:0> ( 1 ) + 0x00000a math error trap vector bslim<12:0> ( 1 ) + 0x00000c dmac error trap vector bslim<12:0> ( 1 ) + 0x00000e generic soft trap vector bslim<12:0> ( 1 ) + 0x000010 reserved bslim<12:0> ( 1 ) + 0x000012 interrupt vector 0 bslim<12:0> ( 1 ) + 0x000014 interrupt vector 1 bslim<12:0> ( 1 ) + 0x000016 :::: :: interrupt vector 52 bslim<12:0> ( 1 ) + 0x00007c interrupt vector 53 bslim<12:0> ( 1 ) + 0x00007e interrupt vector 54 bslim<12:0> ( 1 ) + 0x000080 :::: :: interrupt vector 116 bslim<12:0> ( 1 ) + 0x0000fc interrupt vector 117 bslim<12:0> ( 1 ) + 0x00007e interrupt vector 118 bslim<12:0> ( 1 ) + 0x000100 interrupt vector 119 bslim<12:0> ( 1 ) + 0x000102 interrupt vector 120 bslim<12:0> ( 1 ) + 0x000104 :::: :: interrupt vector 244 bslim<12:0> ( 1 ) + 0x0001fc interrupt vector 245 bslim<12:0> ( 1 ) + 0x0001fe see table 7-1 for interrupt vector details note 1: the address depends on the size of the boot segment defined by bslim<12:0>: [(bslim<12:0> C 1) x 0x400] + offset. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 97 dspic33evxxxgm00x/10x family figure 7-2: dspic33evxxxgm00x/10x family interrupt vector table ivt decreasing natural order priority reset C goto instruction 0x000000 reset C goto address 0x000002 oscillator fail trap vector 0x000004 address error trap vector 0x000006 generic hard trap vector 0x000008 stack error trap vector 0x00000a math error trap vector 0x00000c dmac error trap vector 0x00000e generic soft trap vector 0x000010 reserved 0x000012 interrupt vector 0 0x000014 interrupt vector 1 0x000016 :::: :: interrupt vector 52 0x00007c interrupt vector 53 0x00007e interrupt vector 54 0x000080 :::: :: interrupt vector 116 0x0000fc interrupt vector 117 0x0000fe interrupt vector 118 0x000100 interrupt vector 119 0x000102 interrupt vector 120 0x000104 :::: :: interrupt vector 244 0x0001fc interrupt vector 245 0x0001fe start of code 0x000200 see tab l e 7 - 1 for interrupt vector details downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 98 ? 2013-2015 microchip technology inc. table 7-1: interrupt vector details interrupt source vector no. irq no. ivt address interrupt bit location flag enable priority highest natural order priority external interrupt 0 (int0) 8 0 0x000014 ifs0<0> iec0<0> ipc0<2:0> input capture 1 (ic1) 9 1 0x000016 ifs0<1> iec0<1> ipc0<6:4> output compare 1 (oc1) 10 2 0x000018 ifs0<2> iec0<2> ipc0<10:8> timer1 (t1) 11 3 0x00001a ifs0<3> iec0<3> ipc0<14:12> dma channel 0 (dma0) 12 4 0x00001c ifs0<4> iec0<4> ipc1<2:0> input capture 2 (ic2) 13 5 0x00001e ifs0<5> iec0<5> ipc1<6:4> output compare 2 (oc2) 14 6 0x000020 ifs0<6> iec0<6> ipc1<10:8> timer2 (t2) 15 7 0x000022 ifs0<7> iec0<7> ipc1<14:12> timer3 (t3) 16 8 0x000024 ifs0<8> iec0<8> ipc2<2:0> spi1 error (spi1e) 17 9 0x000026 ifs0<9> iec0<9> ipc2<6:4> spi1 transfer done (spi1) 18 10 0x000028 ifs0<10> iec0<10> ipc2<10:8> uart1 receiver (u1rx) 19 11 0x00002a ifs0<11> iec0<11> ipc2<14:12> uart1 transmitter (u1tx) 20 12 0x00002c ifs0<12> iec0<12> ipc3<2:0> adc1 convert done (ad1) 21 13 0x00002e ifs0<13> iec0<13> ipc3<6:4> dma channel 1 (dma1) 22 14 0x000030 ifs0<14> iec0<14> ipc3<10:8> nvm write complete (nvm) 23 15 0x000032 ifs0<15> iec0<15> ipc3<14:12> i2c1 slave event (si2c1) 24 16 0x000034 ifs1<0> iec1<0> ipc4<2:0> i2c1 master event (mi2c1) 25 17 0x000036 ifs1<1> iec1<1> ipc4<6:4> comparator combined event (cmp1) 26 18 0x000038 ifs1<2> iec1<2> ipc4<10:8> input change interrupt (cn) 27 19 0x00003a ifs1<3> iec1<3> ipc4<14:12> external interrupt 1 (int1) 28 20 0x00003c ifs1<4> iec1<4> ipc5<2:0> dma channel 2 (dma2) 32 24 0x000044 ifs1<8> iec1<8> ipc6<2:0> output compare 3 (oc3) 33 25 0x000046 ifs1<9> iec1<9> ipc6<6:4> output compare 4 (oc4) 34 26 0x000048 ifs1<10> iec1<10> ipc6<10:8> timer4 (t4) 35 27 0x00004a ifs1<11> iec1<11> ipc6<14:12> timer5 (t5) 36 28 0x00004c ifs1<12> iec1<12> ipc7<2:0> external interrupt 2 (int2) 37 29 0x00004e ifs1<13> iec1<13> ipc7<6:4> uart2 receiver (u2rx) 38 30 0x000050 ifs1<14> iec1<14> ipc7<10:8> uart2 transmitter (u2tx) 39 31 0x000052 ifs1<15> iec1<15> ipc7<14:12> spi2 error (spi2e) 40 32 0x000054 ifs2<0> iec2<0> ipc8<2:0> spi2 transfer done (spi2) 41 33 0x000056 ifs2<1> iec2<1> ipc8<6:4> can1 rx data ready (c1rx) ( 1 ) 42 34 0x000058 ifs2<2> iec2<2> ipc8<10:8> can1 event (c1) ( 1 ) 43 35 0x00005a ifs2<3> iec2<3> ipc8<14:12> dma channel 3 (dma3) 44 36 0x00005c ifs2<4> iec2<4> ipc9<2:0> input capture 3 (ic3) 45 37 0x00005e ifs2<5> iec2<5> ipc9<6:4> input capture 4 (ic4) 46 38 0x000060 ifs2<6> iec2<6> ipc9<10:8> reserved 54 46 0x000070 pwm special event match interrupt (psem) 65 57 0x000086 ifs3<9> iec3<9> ipc14<6:4> reserved 69 61 0x00008e reserved 71-72 63-64 0x000092-0x000094 note 1: this interrupt source is available on dspic33evxxxgm10x devices only. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 99 dspic33evxxxgm00x/10x family uart1 error interrupt (u1e) 73 65 0x000096 ifs4<1> iec4<1> ipc16<6: 4> uart2 error interrupt (u2e) 74 66 0x000098 ifs4<2> iec4<2> ipc16<1 0:8> reserved 76-77 68C69 0x00009c-0x00009e can1 tx data request (c1tx) ( 1 ) 78 70 0x0000a0 ifs4<6> iec4<6> ipc17<10:8> reserved 80 72 0x0000a4 reserved 82 74 0x0000a8 reserved 84 76 0x0000ac ctmu interrupt (ctmu) 85 77 0x0000ae ifs4<13> iec4<13> ipc19<6:4> reserved 86-88 78-80 0x0000b0-0x0000b4 reserved 92-94 84-86 0x0000bc-0x0000c0 reserved 100-101 92-93 0x0000cc-0x0000ce pwm generator 1 (pwm1) 102 94 0x0000d0 ifs5<14> iec5<14> ipc23<10:8> pwm generator 2 (pwm2) 103 95 0x0000d2 ifs5<15> iec5<15> ipc23<14:12> pwm generator 3 (pwm3) 104 96 0x0000d4 ifs6<0> iec6<0> ipc24<2:0> reserved 108-149 100-141 0x0000dc-0x00012e icd application (icd) 150 142 0x000142 ifs8<14> iec8<14> ipc35<10:8> reserved 152 144 0x000134 bus collision (i2c1) 173 0x00016e ifs10<13> iec10<13> ipc43<4:6> sent1 error (sent1err) 182 0x000180 ifs11<6> iec11<6> ipc45<10:8> sent1 tx/rx (sent1) 183 0x000182 ifs11<7> iec11<7> ipc45<14:12> sent2 error (sent2err) 184 0x000184 ifs11<8> iec11<8> ipc46<2:0> sent2 tx/rx (sent2) 185 0x000186 ifs11<9> iec11<9> ipc46<6:4> ecc single-bit error (eccsbe) 186 0x000188 ifs11<10> iec11<10> ipc45<10:8> reserved 159-245 187-245 0x000142-0x0001fe lowest natural order priority table 7-1: interrupt vector details (continued) interrupt source vector no. irq no. ivt address interrupt bit location flag enable priority note 1: this interrupt source is available on dspic33evxxxgm10x devices only. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 100 ? 2013-2015 microchip technology inc. 7.3 reset sequence a device reset is not a true exception because the interrupt controller is not involved in the reset process. the dspic33evxxxgm00x/10x family devices clear their registers in response to a reset, which forces the pc to zero. the device then begins program execution at location, 0x000000. a goto instruction at the reset address can redirect program execution to the appropriate start-up routine. 7.4 interrupt control and status registers dspic33evxxxgm00x/10x family devices implement the following registers for the interrupt controller: intcon1 intcon2 intcon3 intcon4 ifsx iecx ipcx inttreg 7.4.1 intcon1 through intcon4 global interrupt control functions are controlled from the intcon1, intcon2, intcon3 and intcon4 registers. intcon1 contains the interrupt nesting disable bit (nstdis), as well as the control and status flags for the processor trap sources. the intcon2 register controls external interrupt request signal behavior and also contains the global interrupt enable bit (gie). intcon3 contains the status flags for the dmt (dead- man timer), dma and do stack overflow status trap sources. the intcon4 register contains the ecc double-bit error (eccdbe) and software-generated hard trap (sght) status bit. 7.4.2 ifsx the ifsx registers maintain all of the interrupt request flags. each source of interrupt has a status bit, which is set by the respective peripherals or external signal and is cleared through software. 7.4.3 iecx the iecx registers maintain all of the interrupt enable bits. these control bits are used to individually enable interrupts from the peripherals or external signals. 7.4.4 ipcx the ipcx registers are used to set the interrupt priority level (ipl) for each source of interrupt. each user interrupt source can be assigned to one of eight priority levels. 7.4.5 inttreg the inttreg register contains the associated interrupt vector number and the new cpu interrupt priority level, which are latched into vector number (vecnum<7:0>) and interrupt priority level bit (ilr<3:0>) fields in the inttreg register. the new interrupt priority level is the priority of the pending interrupt. the interrupt sources are assigned to the ifsx, iecx and ipcx registers in the same sequence as they are listed in table 7-1 . for example, the int0 (external interrupt 0) is shown as having vector number 8 and a natural order priority of 0. thus, the int0if bit is found in ifs0<0>, the int0ie bit in iec0<0> and the int0ip bits in the first position of ipc0 (ipc0<2:0>). 7.4.6 status/control registers although these registers are not specifically part of the interrupt control hardware, two of the cpu control registers contain bits that control interrupt functionality. for more information on these registers, refer to cpu (ds70359) in the dspic33/pic24 family reference manual . the cpu status register, sr, contains the ipl<2:0> bits (sr<7:5>). these bits indicate the current cpu interrupt priority level. the user software can change the current cpu interrupt priority level by writing to the iplx bits. the corcon register contains the ipl3 bit which, together with ipl<2:0>, also indicates the current cpu interrupt priority level. ipl3 is a read-only bit so that trap events cannot be masked by the user software. all interrupt registers are described in register 7-3 to register 7-7 . note: any unimplemented or unused vector locations in the ivt should be pro- grammed with the address of a default interrupt handler routine that contains a reset instruction. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 101 dspic33evxxxgm00x/10x family register 7-1: sr: cpu status register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/c-0 r/c-0 r-0 r/w-0 oa ob sa sb oab sab da dc bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 ipl2 ( 2,3 ) ipl1 ( 2,3 ) ipl0 ( 2,3 ) ra n ov z c bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 7-5 ipl<2:0>: cpu interrupt priority level status bits ( 2 , 3 ) 111 = cpu interrupt priority level is 7 (15); user interrupts are disabled 110 = cpu interrupt priority level is 6 (14) 101 = cpu interrupt priority level is 5 (13) 100 = cpu interrupt priority level is 4 (12) 011 = cpu interrupt priority level is 3 (11) 010 = cpu interrupt priority level is 2 (10) 001 = cpu interrupt priority level is 1 (9) 000 = cpu interrupt priority level is 0 (8) note 1: for complete register details, see register 3-1 . 2: the ipl<2:0> bits are concatenated with the ipl3 bit (corcon<3>) to form the cpu interrupt priority level. the value in parentheses indicates the ipl if ipl3 = 1 . user interrupts are disabled when ipl3 = 1 . 3: the ipl<2:0> status bits are read-only when the nstdis bit (intcon1<15>) = 1 . downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 102 ? 2013-2015 microchip technology inc. register 7-2: corcon: core control register ( 1 ) r/w-0 u-0 r/w-0 r/w-0 r/w-0 r-0 r-0 r-0 var us1 us0 edt dl2 dl1 dl0 bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-0 r/c-0 r-0 r/w-0 r/w-0 sata satb satdw accsat ipl3 ( 2 ) sfa rnd if bit 7 bit 0 legend: c = clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 var: variable exception processing latency control bit 1 = variable exception processing latency is enabled 0 = fixed exception processing latency is enabled bit 3 ipl3: cpu interrupt priority level status bit 3 ( 2 ) 1 = cpu interrupt priority level is greater than 7 0 = cpu interrupt priority level is 7 or less note 1: for complete register details, see register 3-2 . 2: the ipl3 bit is concatenated with the ipl<2:0> bits (sr<7:5>) to form the cpu interrupt priority level. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 103 dspic33evxxxgm00x/10x family register 7-3: intcon1: in terrupt control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 nstdis ovaerr ovberr covaerr covberr ovate ovbte covte bit 15 bit 8 r/w-0 r-0, hc r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 sftacerr div0err dmacerr matherr addrerr stkerr oscfail bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 nstdis: interrupt nesting disable bit 1 = interrupt nesting is disabled 0 = interrupt nesting is enabled bit 14 ovaerr: accumulator a overflow trap flag bit 1 = trap was caused by overflow of accumulator a 0 = trap was not caused by overflow of accumulator a bit 13 ovberr: accumulator b overflow trap flag bit 1 = trap was caused by overflow of accumulator b 0 = trap was not caused by overflow of accumulator b bit 12 covaerr: accumulator a catastrophic overflow trap flag bit 1 = trap was caused by catastrophic overflow of accumulator a 0 = trap was not caused by catastrophic overflow of accumulator a bit 11 covberr: accumulator b catastrophic overflow trap flag bit 1 = trap was caused by catastrophic overflow of accumulator b 0 = trap was not caused by catastrophic overflow of accumulator b bit 10 ovate: accumulator a overflow trap enable bit 1 = trap overflow of accumulator a 0 = trap is disabled bit 9 ovbte: accumulator b overflow trap enable bit 1 = trap overflow of accumulator b 0 = trap is disabled bit 8 covte: catastrophic overflow trap enable bit 1 = trap on catastrophic overflow of accumulator a or b is enabled 0 = trap is disabled bit 7 sftacerr: shift accumulator error status bit 1 = math error trap was caused by an invalid accumulator shift 0 = math error trap was caused by an invalid accumulator shift bit 6 div0err: divide-by-zero error status bit 1 = math error trap was caused by a divide-by-zero 0 = math error trap was not caused by a divide-by-zero bit 5 dmacerr: dmac trap flag bit 1 = dmac trap has occurred 0 = dmac trap has not occurred bit 4 matherr: math error status bit 1 = math error trap has occurred 0 = math error trap has not occurred downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 104 ? 2013-2015 microchip technology inc. bit 3 addrerr: address error trap status bit 1 = address error trap has occurred 0 = address error trap has not occurred bit 2 stkerr: stack error trap status bit 1 = stack error trap has occurred 0 = stack error trap has not occurred bit 1 oscfail: oscillator failure trap status bit 1 = oscillator failure trap has occurred 0 = oscillator failure trap has not occurred bit 0 unimplemented: read as 0 register 7-3: intcon1: interrupt control register 1 (continued) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 105 dspic33evxxxgm00x/10x family register 7-4: intcon2: in terrupt control register 2 r/w-1 r/w-0 r/w-0 u-0 u-0 u-0 u-0 r/w-0 gie disi swtrap a i v t e n bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 int2ep int1ep int0ep bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 gie: global interrupt enable bit 1 = interrupts and associated iecx bits are enabled 0 = interrupts are disabled, but traps are still enabled bit 14 disi: disi instruction status bit 1 = disi instruction is active 0 = disi instruction is not active bit 13 swtrap: software trap status bit 1 = software trap is enabled 0 = software trap is disabled bit 12-9 unimplemented: read as 0 bit 8 aivten: alternate interrupt vector table is enabled bit 1 = aivt is enabled 0 = aivt is disabled bit 7-3 unimplemented: read as 0 bit 2 int2ep: external interrupt 2 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge bit 1 int1ep: external interrupt 1 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge bit 0 int0ep: external interrupt 0 edge detect polarity select bit 1 = interrupt on negative edge 0 = interrupt on positive edge downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 106 ? 2013-2015 microchip technology inc. register 7-5: intcon3: in terrupt control register 3 r/w-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 dmt bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 d a ed o o v r bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 dmt: deadman timer (soft) trap status bit 1 = deadman timer trap has occurred 0 = deadman timer trap has not occurred bit 14-6 unimplemented: read as 0 bit 5 dae: dma address error soft trap status bit 1 = dma address error soft trap has occurred 0 = dma address error soft trap has not occurred bit 4 doovr: do stack overflow soft trap status bit 1 = do stack overflow soft trap has occurred 0 = do stack overflow soft trap has not occurred bit 3-0 unimplemented: read as 0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 107 dspic33evxxxgm00x/10x family register 7-6: intcon4: in terrupt control register 4 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 r-0, hs, sc r-0, hs, sc eccdbe ( 1 ) sght bit 7 bit 0 legend: hs = hardware settable bit sc = software clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-2 unimplemented: read as 0 bit 1 eccdbe: ecc double-bit error trap bit ( 1 ) 1 = ecc double-bit error trap has occurred 0 = ecc double-bit error trap has not occurred bit 0 sght: software-generated hard trap status bit 1 = software-generated hard trap has occurred 0 = software-generated hard trap has not occurred note 1: ecc double-bit error causes a generic hard trap. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 108 ? 2013-2015 microchip technology inc. register 7-7: inttreg: interrupt control and status register u-0 u-0 u-0 u-0 u-0 r-0 r-0 r-0 ilr3 ilr2 ilr1 bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 vecnum7 vecnum6 vecnum5 vecnum4 vecnum3 vecnum2 vecnum1 vecnum0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as 0 bit 10-8 ilr<3:0>: new cpu interrupt priority level bits 1111 = cpu interrupt priority level is 15 0001 = cpu interrupt priority level is 1 0000 = cpu interrupt priority level is 0 bit 7-0 vecnum<7:0>: vector number of pending interrupt bits 11111111 = 255, reserved; do not use 00001001 = 9, input capture 1 (ic1) 00001000 = 8, external interrupt 0 (int0) 00000111 = 7, reserved; do not use 00000110 = 6, generic soft error trap 00000101 = 5, dmac error trap 00000100 = 4, math error trap 00000011 = 3, stack error trap 00000010 = 2, generic hard trap 00000001 = 1, address error trap 00000000 = 0, oscillator fail trap downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 109 dspic33evxxxgm00x/10x family 8.0 direct memory access (dma) the dma controller transfers data between peripheral data registers and data space sram. for the simplified dma block diagram, refer to figure 8-1 . in addition, dma can access the entire data memory space. the data memory bus arbiter is utilized when either the cpu or dma attempts to access sram, resulting in potential dma or cpu stalls. the dma controller supports 4 independent channels. each channel can be configured for transfers to or from selected peripherals. the peripherals supported by the dma controller include: can analog-to-digital converter (adc) serial peripheral interface (spi) uart input capture output compare refer to tab le 8 -1 for a complete list of supported peripherals. figure 8-1: peripheral to dma controller note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to direct memory access (dma) (ds70348) in the dspic33/ pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. dma peripheral data memory sram (see figure 4-13 ) arbiter downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 110 ? 2013-2015 microchip technology inc. in addition, dma transfers can be triggered by timers as well as external interrupts. each dma channel is unidirectional. two dma channels must be allocated to read and write to a peripheral. if more than one channel receives a request to transfer data, a simple fixed priority scheme, based on channel number, dictates which channel completes the transfer and which channel or channels are left pending. each dma channel moves a block of data, after which, it generates an interrupt to the cpu to indicate that the block is available for processing. the dma controller provides these functional capabilities: four dma channels register indirect with post-increment addressing mode register indirect without post-increment addressing mode peripheral indirect addressing mode (peripheral generates destination address) cpu interrupt after half or full block transfer complete byte or word transfers fixed priority channel arbitration manual (software) or automatic (peripheral dma requests) transfer initiation one-shot or auto-repeat block transfer modes ping-pong mode (automatic switch between two sram start addresses after each block transfer complete) dma request for each channel can be selected from any supported interrupt source debug support features the peripherals that can utilize dma are listed in table 8-1 . table 8-1: dma channel to pe ripheral associations peripheral to dma association dmaxreq register irqsel<7:0> bits dmaxpad register (values to read from peripheral) dmaxpad register (values to write to peripheral) external interrupt 0 (int0) 00000000 input capture 1 (ic1) 00000001 0x0144 (ic1buf) input capture 2 (ic2) 00000101 0x014c (ic2buf) input capture 3 (ic3) 00100101 0x0154 (ic3buf) input capture 4 (ic4) 00100110 0x015c (ic4buf) output compare 1 (oc1) 00000010 0x0906 (oc1r) 0x0904 (oc1rs) output compare 2 (oc2) 00000110 0x0910 (oc2r) 0x090e (oc2rs) output compare 3 (oc3) 00011001 0x091a (oc3r) 0x0918 (oc3rs) output compare 4 (oc4) 00011010 0x0924 (oc4r) 0x0922 (oc4rs) timer2 (tmr2) 00000111 timer3 (tmr3) 00001000 timer4 (tmr4) 00011011 timer5 (tmr5) 00011100 spi1 transfer done 00001010 0x0248 (spi1buf) 0x0248 (spi1buf) spi2 transfer done 00100001 0x0268 (spi2buf) 0x0268 (spi2buf) uart1 receiver (uart1rx) 00001011 0x0226 (u1rxreg) uart1 transmitter (uart1tx) 00001100 0x0224 (u1txreg) uart2 receiver (uart2rx) 00011110 0x0236 (u2rxreg) uart2 transmitter (uart2tx) 00011111 0x0234 (u2txreg) rx data ready (can1) 00100010 0x0440 (c1rxd) tx data request (can1) 01000110 0x0442 (c1txd) adc1 convert done (adc1) 00001101 0x0300 (adc1buf0) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 111 dspic33evxxxgm00x/10x family figure 8-2 illustrates the dma controller block diagram. figure 8-2: dma controller block diagram 8.1 dmac controller registers each dmac channel x (where x = 0 to 3) contains the following registers: 16-bit dma channel x control register (dmaxcon) 16-bit dma channel x irq select register (dmaxreq) 32-bit dma channel x start address register a high/low (dmaxstah/l) 32-bit dma channel x start address register b high/low (dmaxstbh/l) 16-bit dma channel x peripheral address register (dmaxpad) 14-bit dma channel x transfer count register (dmaxcnt) additional status registers (dmapwc, dmarqc, dmapps, dmalca and dsadrh/l) are common to all dmac channels. these status registers provide information on write and request collisions, as well as on last address and channel access information. the dma interrupt flags (dmaxif) are located in an ifsx register in the interrupt controller. the corresponding dma interrupt enable bits (dmaxie) are located in an iecx register in the interrupt controller and the corresponding dma interrupt priority bits (dmaxip) are located in an ipcx register in the interrupt controller. cpu arbiter peripheral non-dma dma x-bus peripheral indirect address dma control dma controller dma cpu peripheral x-bus irq to dma and interrupt controller modules irq to dma and interrupt controller modules irq to dma and interrupt controller modules 0123 sram channels peripheral 1 dma ready cpu dma peripheral 3 dma ready cpu dma peripheral 2 dma ready cpu dma note: cpu and dma address buses are not shown for clarity. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 112 ? 2013-2015 microchip technology inc. register 8-1: dmaxcon: dm a channel x control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 chen size dir half nullw bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 a m o d e 1a m o d e 0 m o d e 1m o d e 0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 chen: dma channel enable bit 1 = channel is enabled 0 = channel is disabled bit 14 size: dma data transfer size bit 1 =byte 0 =word bit 13 dir: dma transfer direction bit (source/destination bus select) 1 = reads from ram address, writes to peripheral address 0 = reads from peripheral address, writes to ram address bit 12 half: dma block transfer interrupt select bit 1 = initiates interrupt when half of the data has been moved 0 = initiates interrupt when all of the data has been moved bit 11 nullw: null data peripheral write mode select bit 1 = null data write to peripheral in addition to ram write (dir bit must also be clear) 0 = normal operation bit 10-6 unimplemented: read as 0 bit 5-4 amode<1:0>: dma channel addressing mode select bits 11 = reserved 10 = peripheral indirect mode 01 = register indirect without post-increment mode 00 = register indirect with post-increment mode bit 3-2 unimplemented: read as 0 bit 1-0 mode<1:0>: dma channel operating mode select bits 11 = one-shot ping-pong modes are enabled (one block transfer from/to each dma buffer) 10 = continuous ping-pong modes are enabled 01 = one-shot ping-pong modes are disabled 00 = continuous ping-pong modes are disabled downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 113 dspic33evxxxgm00x/10x family register 8-2: dmaxreq: dma channel x irq select register r/s-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 force ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 irqsel7 irqsel6 irqsel5 irqsel 4 irqsel3 irqsel2 irqsel1 irqsel0 bit 7 bit 0 legend: s = settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 force: force dma transfer bit ( 1 ) 1 = forces a single dma transfer (manual mode) 0 = automatic dma transfer initiation by dma request bit 14-8 unimplemented: read as 0 bit 7-0 irqsel<7:0>: dma peripheral irq number select bits 01000110 = tx data request (can1) ( 2 ) 00100110 = input capture 4 (ic4) 00100101 = input capture 3 (ic3) 00100010 = rx data ready (can1) 00100001 = spi2 transfer done (spi2) 00011111 = uart2 transmitter (uart2tx) 00011110 = uart2 receiver (uart2rx) 00011100 = timer5 (tmr5) 00011011 = timer4 (tmr4) 00011010 = output compare 4 (oc4) 00011001 = output compare 3 (oc3) 00001101 = adc1 convert done (adc1) 00001100 = uart1 transmitter (uart1tx) 00001011 = uart1 receiver (uart1rx) 00001010 = spi1 transfer done (spi1) 00001000 = timer3 (tmr3) 00000111 = timer2 (tmr2) 00000110 = output compare 2 (oc2) 00000101 = input capture 2 (ic2) 00000010 = output compare 1 (oc1) 00000001 = input capture 1 (ic1) 00000000 = external interrupt 0 (int0) note 1: the force bit cannot be cleared by user software. the force bit is cleared by har dware when the forced dma transfer is complete or the channel is disabled (chen = 0 ). 2: this select bit is only available on dspic33evxxxgm10x devices. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 114 ? 2013-2015 microchip technology inc. register 8-3: dmaxstah: dma channel x start address register a (high) u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sta<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 sta<23:16>: dma primary start address bits (source or destination) register 8-4: dmaxstal: dma channel x start address register a (low) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sta<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sta<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 sta<15:0>: dma primary start address bits (source or destination) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 115 dspic33evxxxgm00x/10x family register 8-5: dmaxstbh: dma channel x start address register b (high) u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stb<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 stb<23:16>: dma secondary start address bits (source or destination) register 8-6: dmaxstbl: dma channel x start address register b (low) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stb<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stb<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 stb<15:0>: dma secondary start address bits (source or destination) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 116 ? 2013-2015 microchip technology inc. register 8-7: dmaxpad: dma channel x peripheral address register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pad<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pad<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 pad<15:0>: dma peripheral address register bits note 1: if the channel is enabled (i.e., active), writes to this register may result in unpredictable behavior of the dma channel and should be avoided. register 8-8: dmaxcnt: dma channel x transfer count register ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cnt<13:8> ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cnt<7:0> ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-0 cnt<13:0>: dma transfer count register bits ( 2 ) note 1: if the channel is enabled (i.e., active), writes to this register may result in unpredictable behavior of the dma channel and should be avoided. 2: the number of dma transfers = cnt<13:0> + 1. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 117 dspic33evxxxgm00x/10x family register 8-9: dsadrh: dma most re cent ram high address register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 dsadr<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 dsadr<23:16>: most recent dma address accessed by dma bits register 8-10: dsadrl: dma most recent ram low address register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 dsadr<15:8> bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 dsadr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 dsadr<15:0>: most recent dma address accessed by dma bits downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 118 ? 2013-2015 microchip technology inc. register 8-11: dmapwc: dma peripheral write collision status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 pwcol3 pwcol2 pwcol1 pwcol0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3 pwcol3: channel 3 peripheral write collision flag bit 1 = write collision is detected 0 = write collision is not detected bit 2 pwcol2: channel 2 peripheral write collision flag bit 1 = write collision is detected 0 = write collision is not detected bit 1 pwcol1: channel 1 peripheral write collision flag bit 1 = write collision is detected 0 = write collision is not detected bit 0 pwcol0: channel 0 peripheral write collision flag bit 1 = write collision is detected 0 = write collision is not detected downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 119 dspic33evxxxgm00x/10x family register 8-12: dmarqc: dma request collision status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 rqcol3 rqcol2 rqcol1 rqcol0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3 rqcol3: channel 3 transfer request collision flag bit 1 = user force and interrupt-based request collision is detected 0 = user force and interrupt-based request collision is not detected bit 2 rqcol2: channel 2 transfer request collision flag bit 1 = user force and interrupt-based request collision is detected 0 = user force and interrupt-based request collision is not detected bit 1 rqcol1: channel 1 transfer request collision flag bit 1 = user force and interrupt-based request collision is detected 0 = user force and interrupt-based request collision is not detected bit 0 rqcol0: channel 0 transfer request collision flag bit 1 = user force and interrupt-based request collision is detected 0 = user force and interrupt-based request collision is not detected downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 120 ? 2013-2015 microchip technology inc. register 8-13: dmalca: dma last channel active status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-1 r-1 r-1 r-1 lstch<3:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3-0 lstch<3:0>: last dmac channel active status bits 1111 = no dma transfer has occurred since system reset 1110 = reserved 0100 = reserved 0011 = last data transfer was handled by channel 3 0010 = last data transfer was handled by channel 2 0001 = last data transfer was handled by channel 1 0000 = last data transfer was handled by channel 0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 121 dspic33evxxxgm00x/10x family register 8-14: dmapps: dma ping-pong status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r-0 r-0 r-0 r-0 ppst3 ppst2 ppst1 ppst0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3 ppst3: channel 3 ping-pong mode status flag bit 1 = dma3stb register is selected 0 = dma3sta register is selected bit 2 ppst2: channel 2 ping-pong mode status flag bit 1 = dma2stb register is selected 0 = dma2sta register is selected bit 1 ppst1: channel 1 ping-pong mode status flag bit 1 = dma1stb register is selected 0 = dma1sta register is selected bit 0 ppst0: channel 0 ping-pong mode status flag bit 1 = dma0stb register is selected 0 = dma0sta register is selected downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 122 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 123 dspic33evxxxgm00x/10x family 9.0 oscillator configuration the dspic33evxxxgm00x/10x family oscillator system provides: on-chip phase-locked loop (pll) to boost internal operating frequency on select internal and external oscillator sources on-the-fly clock switching between various clock sources doze mode for system power savings fail-safe clock monitor (fscm) that detects clock failure and permits safe application recovery or shutdown. backup frc (bfrc) function that provides a system clock when there is a failure in the frc clock configuration bits for clock source selection a simplified diagram of the oscillator system is shown in figure 9-1 . figure 9-1: oscillator system diagram note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to oscillator (ds70580) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note 1: see figure 9-2 for pll and f vco details. 2: the term, f p , refers to the clock source for all peripherals, while f cy refers to the clock source for the cpu. throughout this document, f cy and f p are used interchangeably, except in the case of doze mode. f p and f cy will be different when doze mode is used with a doze ratio of 1:2 or lower. xtpll, hspll, xt, hs, ec frcdiv<2:0> wdt, pwrt frcdivn frcdiv16 ecpll, frcpll nosc<2:0> fnosc<2:0> reset frc oscillator doze<2:0> s3s1 s2 s1/s3 s7 s6 frc lprc s0s5 clock switch s7 clock fail tun<5:0> pll (1) f cy (2) f osc frcdiv doze fscm, ctmu poscclk frcclk f vco (1) osc2 osc1 primary oscillator poscmd<1:0> f p (2) n rosel rodiv<3:0> refclko poscclk rpn f osc reference clock generation s4 bfrc lprc oscillator bfrc oscillator if cf = 1 16 2 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 124 ? 2013-2015 microchip technology inc. 9.1 cpu clocking system the dspic33evxxxgm00x/10x family of devices provides the following six system clock options: fast rc (frc) oscillator frc oscillator with phase-locked loop (pll) frc oscillator with postscaler primary (xt, hs or ec) oscillator primary oscillator with pll low-power rc (lprc) oscillator for instruction execution speed or device operating frequency, f cy , see equation 9-1 . equation 9-1: device operating frequency figure 9-2 provides the block diagram of the pll module. equation 9-2 provides the relationship between input frequency (f in ) and output frequency (f osc ). equation 9-3 provides the relationship between input frequency (f in ) and vco frequency (f sys ). figure 9-2: pll block diagram equation 9-2: f osc calculation equation 9-3: f vco calculation f cy = f osc / 2 0.8 mhz < f plli (1) < 8.0 mhz 120 mhz < f sys (1) < 340 mhz f osc < 140 mhz n1 m n2 vco pfd f plli f sys f osc pllpst<1:0> plldiv<8:0> pllpre<4:0> f in note 1: this frequency range must be met at all times. ( plldiv <8:0> + 2) ( pllpre <4:0> + 2) ? 2( pllpost <1:0> + 1) () f osc = f in ? = f in ? m n 1 ?? ? ? () where: n 1 = pllpre <4:0> + 2 n 2 = 2 x ( pllpost< 1:0> + 1) m = plldiv <8:0> + 2 ( plldiv <8:0> + 2) ( pllpre <4:0> + 2) () f sys = f in ? = f in ? m n 1 () downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 125 dspic33evxxxgm00x/10x family table 9-1 provides the configuration bits which allow users to choose between the various clock modes. table 9-1: configuration bit va lues for clock selection oscillator mode oscillator source poscmd<1:0> fnosc<2:0> fast rc oscillator with divide-by-n (frcdivn) ( 1 , 2 ) internal xx 111 fast rc oscillator with divide-by-16 (frcdiv16) ( 1 ) internal xx 110 low-power rc oscillator (lprc) ( 1 ) internal xx 101 primary oscillator (hs) with pll (hspll) primary 10 011 primary oscillator (xt) with pll (xtpll) primary 01 011 primary oscillator (ec) with pll (ecpll) ( 1 ) primary 00 011 primary oscillator (hs) primary 10 010 primary oscillator (xt) primary 01 010 primary oscillator (ec) ( 1 ) primary 00 010 fast rc oscillator (frc) with divide-by-n and pll (frcpll) ( 1 ) internal xx 001 fast rc oscillator (frc) ( 1 ) internal xx 000 note 1: osc2 pin function is determined by the osciofnc configuration bit. 2: this is the default oscillator mode for an unprogrammed (erased) device. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 126 ? 2013-2015 microchip technology inc. register 9-1: osccon: os cillator control register ( 1 , 3 ) u-0 r-0 r-0 r-0 u-0 r/w-y r/w-y r/w-y cosc2 cosc1 cosc0 n o s c 2 ( 2 ) nosc1 ( 2 ) nosc0 ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r-0 u-0 r/c-0 u-0 u-0 r/w-0 clklock iolock lock c f oswen bit 7 bit 0 legend: c = clearable bit y = value set from configuration bits on por r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-12 cosc<2:0>: current oscillator selection bits (read-only) 111 = fast rc oscillator (frc) with divide-by-n 110 = fast rc oscillator (frc) with divide-by-16 101 = low-power rc oscillator (lprc) 100 = backup frc oscillator (bfrc) ( 4 ) 011 = primary oscillator (xt, hs, ec) with pll 010 = primary oscillator (xt, hs, ec) 001 = fast rc oscillator (frc) divided by n and pll 000 = fast rc oscillator (frc) bit 11 unimplemented: read as 0 bit 10-8 nosc<2:0>: new oscillator selection bits ( 2 ) 111 = fast rc oscillator (frc) with divide-by-n 110 = fast rc oscillator (frc) with divide-by-16 101 = low-power rc oscillator (lprc) 100 = reserved ( 5 ) 011 = primary oscillator (xt, hs, ec) with pll 010 = primary oscillator (xt, hs, ec) 001 = fast rc oscillator (frc) divided by n and pll 000 = fast rc oscillator (frc) bit 7 clklock: clock lock enable bit 1 = if fcksm0 = 1 , then clock and pll configurations are locked; if fcksm0 = 0 , then clock and pll configurations may be modified 0 = clock and pll selections are not locked, configurations may be modified bit 6 iolock: i/o lock enable bit 1 = i/o lock is active 0 = i/o lock is not active bit 5 lock: pll lock status bit (read-only) 1 = indicates that pll is in lock or pll start-up timer is satisfied 0 = indicates that pll is out of lock, start-up timer is in progress or pll is disabled note 1: writes to this register require an unlock sequence. refer to oscillator (ds70580) in the dspic33/pic24 family reference manual (available from the microchip web site) for details. 2: direct clock switches between any primary oscillator mode with pll and frcpll mode are not p ermit- ted. this applies to clock switches in either direction. in these instances, the application must switch to frc mode as a transitional clock source between the two pll modes. 3: this register resets only on a power-on reset (por). 4: cosc<2:0> bits will be set to 0b100 when frc fails. 5: user cannot write 0b100 to nosc<2:0>. cosc<2:0> will be set to 0b100 (bfrc) when the frc fails. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 127 dspic33evxxxgm00x/10x family bit 4 unimplemented: read as 0 bit 3 cf: clock fail detect bit (read/clear by application) 1 = fscm has detected a clock failure 0 = fscm has not detected a clock failure bit 2-1 unimplemented: read as 0 bit 0 oswen: oscillator switch enable bit 1 = requests oscillator switch to selection specified by the nosc<2:0> bits 0 = oscillator switch is complete register 9-1: osccon: os cillator control register ( 1 , 3 ) (continued) note 1: writes to this register require an unlock sequence. refer to oscillator (ds70580) in the dspic33/pic24 family reference manual (available from the microchip web site) for details. 2: direct clock switches between any primary oscillator mode with pll and frcpll mode are not pe rmit- ted. this applies to clock switches in either direction. in these instances, the application must switch to frc mode as a transitional clock source between the two pll modes. 3: this register resets only on a power-on reset (por). 4: cosc<2:0> bits will be set to 0b100 when frc fails. 5: user cannot write 0b100 to nosc<2:0>. cosc<2:0> will be set to 0b100 (bfrc) when the frc fails. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 128 ? 2013-2015 microchip technology inc. register 9-2: clkdiv: clock divisor register ( 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 roi doze2 ( 3 ) doze1 ( 3 ) doze0 ( 3 ) dozen ( 1 , 4 ) frcdiv2 frcdiv1 frcdiv0 bit 15 bit 8 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pllpost1 pllpost0 pllpre4 pllpre3 pllpre2 pllpre1 pllpre0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 roi: recover on interrupt bit 1 = interrupts will clear the dozen bit 0 = interrupts have no effect on the dozen bit bit 14-12 doze<2:0>: processor clock reduction select bits ( 3 ) 111 = f cy divided by 128 110 = f cy divided by 64 101 = f cy divided by 32 100 = f cy divided by 16 011 = f cy divided by 8 010 = f cy divided by 4 001 = f cy divided by 2 000 = f cy divided by 1 (default) bit 11 dozen: doze mode enable bit ( 1 , 4 ) 1 = doze<2:0> field specifies the ratio between the peripheral clocks and the processor clocks 0 = processor clock and peripheral clock ratio are forced to 1:1 bit 10-8 frcdiv<2:0>: internal fast rc oscillator postscaler bits 111 = frc divided by 256 110 = frc divided by 64 101 = frc divided by 32 100 = frc divided by 16 011 = frc divided by 8 010 = frc divided by 4 001 = frc divided by 2 (default) 000 = frc divided by 1 bit 7-6 pllpost<1:0>: pll vco output divider select bits (also denoted as n2, pll postscaler) 11 = output divided by 8 10 = reserved 01 = output divided by 4 00 = output divided by 2 bit 5 unimplemented: read as 0 note 1: this bit is cleared when the roi bit is set and an interrupt occurs. 2: this register resets only on a power-on reset (por). 3: doze<2:0> bits can only be written to when the dozen bit is clear. if dozen = 1 , any writes to doze<2:0> are ignored. 4: the dozen bit cannot be set if doze<2:0> = 000 . if doze<2:0> = 000 , any attempt by user software to set the dozen bit is ignored. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 129 dspic33evxxxgm00x/10x family bit 4-0 pllpre<4:0>: pll phase detector input divider select bits (also denoted as n1, pll prescaler) 11111 = input divided by 33 00001 = input divided by 3 00000 = input divided by 2 (default) register 9-2: clkdiv: clock divisor register ( 2 ) (continued) note 1: this bit is cleared when the roi bit is set and an interrupt occurs. 2: this register resets only on a power-on reset (por). 3: doze<2:0> bits can only be written to when the dozen bit is clear. if dozen = 1 , any writes to doze<2:0> are ignored. 4: the dozen bit cannot be set if doze<2:0> = 000 . if doze<2:0> = 000 , any attempt by user software to set the dozen bit is ignored. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 130 ? 2013-2015 microchip technology inc. register 9-3: pllfbd: pll feedback divisor register ( 1 ) u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 p l l d i v 8 bit 15 bit 8 r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 plldiv<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-9 unimplemented: read as 0 bit 8-0 plldiv<8:0>: pll feedback divisor bits (also denoted as m, pll multiplier) 111111111 = 513 000110000 = 50 (default) 000000010 = 4 000000001 = 3 000000000 = 2 note 1: this register is reset only on a power-on reset (por). downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 131 dspic33evxxxgm00x/10x family register 9-4: osctun: frc oscillator tuning register ( 1 ) u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 tun<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-6 unimplemented: read as 0 bit 5-0 tun<5:0>: frc oscillator tuning bits 111111 = center frequency C 0.048% (7.363 mhz) 100001 = center frequency C 1.5% (7.259 mhz) 100000 = center frequency C 1.548% (7.2552 mhz) 011111 = center frequency + 1.5% (7.48 mhz) 011110 = center frequency + 1.452% (7.477 mhz) 000001 = center frequency + 0.048% (7.373 mhz) 000000 = center frequency (7.37 mhz nominal) note 1: this register is reset only on a power-on reset (por). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 132 ? 2013-2015 microchip technology inc. register 9-5: refocon: reference oscillator control register r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 roon rosslp rosel rodiv3 ( 1 ) rodiv2 ( 1 ) rodiv1 ( 1 ) rodiv0 ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 roon: reference oscillator output enable bit 1 = reference oscillator output is enabled on the refclk pin ( 2 ) 0 = reference oscillator output is disabled bit 14 unimplemented: read as 0 bit 13 rosslp: reference oscillator run in sleep bit 1 = reference oscillator output continues to run in sleep mode 0 = reference oscillator output is disabled in sleep mode bit 12 rosel: reference oscillator source select bit 1 = oscillator crystal is used as the reference clock 0 = system clock is used as the reference clock bit 11-8 rodiv<3:0>: reference oscillator divider bits ( 1 ) 1111 = reference clock divided by 32,768 1110 = reference clock divided by 16,384 1101 = reference clock divided by 8,192 1100 = reference clock divided by 4,096 1011 = reference clock divided by 2,048 1010 = reference clock divided by 1,024 1001 = reference clock divided by 512 1000 = reference clock divided by 256 0111 = reference clock divided by 128 0110 = reference clock divided by 64 0101 = reference clock divided by 32 0100 = reference clock divided by 16 0011 = reference clock divided by 8 0010 = reference clock divided by 4 0001 = reference clock divided by 2 0000 = reference clock bit 7-0 unimplemented: read as 0 note 1: the reference oscillator output must be disabled (roon = 0 ) before writing to these bits. 2: this pin is remappable. see section 11.5 peripheral pin select (pps) for more information. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 133 dspic33evxxxgm00x/10x family 10.0 power-saving features the dspic33evxxxgm00x/10x devices provide the ability to manage power consumption by selectively managing clocking to the cpu and the peripherals. in general, a lower clock frequency and a reduction in the number of peripherals being clocked constitutes lower consumed power. the dspic33evxxxgm00x/10x family devices can manage power consumption in the following four methods: clock frequency instruction-based sleep and idle modes software controlled doze mode selective peripheral control in software combinations of these methods can be used to selectively tailor an applications power consumption while still maintaining critical application features, such as timing-sensitive communications. 10.1 clock frequency and clock switching the dspic33evxxxgm00x/10x family devices allow a wide range of clock frequencies to be selected under application control. if the system clock configuration is not locked, users can choose low-power or high- precision oscillators by simply changing the noscx bits (osccon<10:8>). for more information on the process of changing a system clock during operation, as well as limitations to the process, see section 9.0 oscillator configuration . 10.2 instruction-based power-saving modes the dspic33evxxxgm00x/10x family devices have two special power-saving modes that are entered through the execution of a special pwrsav instruction. sleep mode stops clock operation and halts all code execution. idle mode halts the cpu and code execution, but allows peripheral modules to continue operation. the assembler syntax of the pwrsav instruction is shown in example 10-1 . sleep and idle modes can be exited as a result of an enabled interrupt, wdt time-out or a device reset. when the device exits these modes, it is said to wake-up. example 10-1: pwrsav instruction syntax note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to watchdog timer and power-saving modes (ds70615) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: sleep_mode and idle_mode are con- stants defined in the assembler include file for the selected device. pwrsav #sleep_mode ; put the device into sleep mode pwrsav #idle_mode ; put the device into idle mode downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 134 ? 2013-2015 microchip technology inc. 10.2.1 sleep mode the following events occur in sleep mode: the system clock source is shut down. if an on-chip oscillator is used, it is turned off. the device current consumption is reduced to a minimum, provided that no i/o pin is sourcing current. the fail-safe clock monitor does not operate, since the system clock source is disabled. the lprc clock continues to run in sleep mode if the wdt is enabled. the wdt, if enabled, is automatically cleared before entering sleep mode. some device features or peripherals can continue to operate. this includes items such as the input change notification (icn) on the i/o ports or peripherals that use an external clock input. any peripheral that requires the system clock source for its operation is disabled. the device wakes up from sleep mode on any of these events: any interrupt source that is individually enabled any form of device reset a wdt time-out on wake-up from sleep mode, the processor restarts with the same clock source that was active when sleep mode was entered. for optimal power savings, the internal regulator and the flash regulator can be configured to go into standby mode when sleep mode is entered by clearing the vregs (rcon<8>) and vregsf (rcon<11>) bits (default configuration). if the application requires a faster wake-up time, and can accept higher current requirements, the vregs (rcon<8>) and vregsf (rcon<11>) bits can be set to keep the internal regulator and the flash regulator active during sleep mode. 10.2.2 idle mode the following events occur in idle mode: the cpu stops executing instructions. the wdt is automatically cleared. the system clock source remains active. by default, all peripheral modules continue to operate normally from the system clock source, but can also be selectively disabled (see section 10.4 peripheral module disable ). if the wdt or fscm is enabled, the lprc also remains active. the device wakes from idle mode on any of these events: any interrupt that is individually enabled any device reset a wdt time-out on wake-up from idle mode, the clock is reapplied to the cpu and instruction execution will begin (2-4 clock cycles later), starting with the instruction following the pwrsav instruction or the first instruction in the interrupt service routine (isr). all peripherals also have the option to discontinue operation when idle mode is entered to allow for increased power savings. this option is selectable in the control register of each peripheral; for example, the tsidl bit in the timer1 control register (t1con<13>). 10.2.3 interrupts coincident with power save instructions any interrupt that coincides with the execution of a pwrsav instruction is held off until entry into sleep or idle mode has completed. the device then wakes up either from sleep mode or idle mode. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 135 dspic33evxxxgm00x/10x family 10.3 doze mode the preferred strategies for reducing power consump- tion are changing clock speed and invoking one of the power-saving modes. in some circumstances, this may not be practical. for example, it may be necessary for an application to maintain uninterrupted synchronous communication, even while it is doing nothing else. reducing system clock speed can introduce communi- cation errors, while using a power-saving mode can stop communications completely. doze mode is a simple and effective alternative method to reduce power consumption while the device is still executing code. in this mode, the system clock continues to operate from the same source and at the same speed. peripheral modules continue to be clocked at the same speed, while the cpu clock speed is reduced. synchronization between the two clock domains is maintained, allowing the peripherals to access the sfrs while the cpu executes code at a slower rate. doze mode is enabled by setting the dozen bit (clkdiv<11>). the ratio between peripheral and core clock speed is determined by the doze<2:0> bits (clkdiv<14:12>). there are eight possible configu- rations, from 1:1 to 1:128, with 1:1 being the default setting. programs can use doze mode to selectively reduce power consumption in event-driven applications. this allows clock-sensitive functions, such as synchronous communications, to continue without interruption while the cpu idles, waiting for something to invoke an inter- rupt routine. an automatic return to full-speed cpu operation on interrupts can be enabled by setting the roi bit (clkdiv<15>). by default, interrupt events have no effect on doze mode operation. for example, suppose the device is operating at 20 mips and the can module has been configured for 500 kbps, based on this device operating speed. if the device is placed in doze mode, with a clock frequency ratio of 1:4, the can module continues to communicate at the required bit rate of 500 kbps, but the cpu now starts executing instructions at a frequency of 5 mips. 10.4 peripheral module disable the peripheral module disable (pmd) registers provide a method to disable a peripheral module by stopping all clock sources supplied to that module. when a peripheral is disabled, using the appropriate pmdx control bit, the peripheral is in a minimum power consumption state. the control and status registers associated with the peripheral are also disabled, so writes to those registers do not have any effect and read values are invalid. a peripheral module is enabled only if both the associ- ated bit in the pmdx register is cleared and the peripheral is supported by the specific dspic ? dsc variant. if the peripheral is present in the device, it is enabled in the pmdx register by default. note: if a pmdx bit is set, the corresponding module is disabled after a delay of one instruction cycle. similarly, if a pmdx bit is cleared, the corresponding module is enabled after a delay of one instruction cycle (assuming the module control regis- ters are already configured to enable module operation). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 136 ? 2013-2015 microchip technology inc. register 10-1: pmd1: peripheral mo dule disable control register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 u-0 t5md t4md t3md t2md t1md pwmmd bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 i2c1md u2md u1md spi2md spi1md c 1 m d ( 1 ) ad1md bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 t5md: timer5 module disable bit 1 = timer5 module is disabled 0 = timer5 module is enabled bit 14 t4md: timer4 module disable bit 1 = timer4 module is disabled 0 = timer4 module is enabled bit 13 t3md: timer3 module disable bit 1 = timer3 module is disabled 0 = timer3 module is enabled bit 12 t2md: timer2 module disable bit 1 = timer2 module is disabled 0 = timer2 module is enabled bit 11 t1md: timer1 module disable bit 1 = timer1 module is disabled 0 = timer1 module is enabled bit 10 unimplemented: read as 0 bit 9 pwmmd: pwm module disable bit 1 = pwm module is disabled 0 = pwm module is enabled bit 8 unimplemented: read as 0 bit 7 i2c1md: i2c1 module disable bit 1 = i2c1 module is disabled 0 = i2c1 module is enabled bit 6 u2md: uart2 module disable bit 1 = uart2 module is disabled 0 = uart2 module is enabled bit 5 u1md: uart1 module disable bit 1 = uart1 module is disabled 0 = uart1 module is enabled bit 4 spi2md: spi2 module disable bit 1 = spi2 module is disabled 0 = spi2 module is enabled bit 3 spi1md: spi1 module disable bit 1 = spi1 module is disabled 0 = spi1 module is enabled note 1: this bit is available on dspic33evxxxgm10x devices only. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 137 dspic33evxxxgm00x/10x family bit 2 unimplemented: read as 0 bit 1 c1md: can1 module disable bit ( 1 ) 1 = can1 module is disabled 0 = can1 module is enabled bit 0 ad1md: adc1 module disable bit 1 = adc1 module is disabled 0 = adc1 module is enabled register 10-1: pmd1: peripheral module disable control register 1 (continued) note 1: this bit is available on dspic33evxxxgm10x devices only. register 10-2: pmd2: peripheral mo dule disable control register 2 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 ic4md ic3md ic2md ic1md bit 15 bit 8 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 oc4md oc3md oc2md oc1md bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-8 ic4md:ic1md: input capture x (x = 1-4) module disable bits 1 = input capture x module is disabled 0 = input capture x module is enabled bit 7-4 unimplemented: read as 0 bit 3-0 oc4md:oc1md: output compare x (x = 1-4) module disable bits 1 = output compare x module is disabled 0 = output compare x module is enabled downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 138 ? 2013-2015 microchip technology inc. register 10-4: pmd4: peripheral mo dule disable control register 4 register 10-3: pmd3: peripheral mo dule disable control register 3 u-0 u-0 u-0 u-0 u-0 r/w-0 u-0 u-0 cmpmd bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as 0 bit 10 cmpmd: comparator module disable bit 1 = comparator module is disabled 0 = comparator module is enabled bit 9-0 unimplemented: read as 0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 r/w-0 r/w-0 u-0 u-0 r e f o m dc t m u m d bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-4 unimplemented: read as 0 bit 3 refomd: reference clock module disable bit 1 = reference clock module is disabled 0 = reference clock module is enabled bit 2 ctmumd: ctmu module disable bit 1 = ctmu module is disabled 0 = ctmu module is enabled bit 1-0 unimplemented: read as 0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 139 dspic33evxxxgm00x/10x family register 10-5: pmd6: peripheral mo dule disable control register 6 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 pwm3md pwm2md pwm1md bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-11 unimplemented: read as 0 bit 10-8 pwm3md:pwm1md: pwmx (x = 1-3) module disable bit 1 = pwmx module is disabled 0 = pwmx module is enabled bit 7-0 unimplemented: read as 0 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 140 ? 2013-2015 microchip technology inc. register 10-6: pmd7: peripheral mo dule disable control register 7 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 r/w-0 u-0 u-0 u-0 u-0 d m a 0 m d ( 1 ) dma1md ( 1 ) dma2md ( 1 ) dma3md ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 unimplemented: read as 0 bit 4 dma0md: dma0 module disable bit ( 1 ) 1 = dma0 module is disabled 0 = dma0 module is enabled dma1md: dma1 module disable bit ( 1 ) 1 = dma1 module is disabled 0 = dma1 module is enabled dma2md: dma2 module disable bit ( 1 ) 1 = dma2 module is disabled 0 = dma2 module is enabled dma3md: dma3 module disable bit ( 1 ) 1 = dma3 module is disabled 0 = dma3 module is enabled bit 3-0 unimplemented: read as 0 note 1: this single bit enables and disables all four dma channels. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 141 dspic33evxxxgm00x/10x family register 10-7: pmd8: peripheral mo dule disable control register 8 u-0 u-0 u-0 r/w-0 r/w-0 u-0 u-0 r/w-0 sent2md sent1md dmtmd bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12 sent2md: sent2 module disable bit 1 = sent2 module is disabled 0 = sent2 module is enabled bit 11 sent1md: sent1 module disable bit 1 = sent1 module is disabled 0 = sent1 module is enabled bit 10-9 unimplemented: read as 0 bit 8 dmtmd: deadman timer disable bit 1 = deadman timer is disabled 0 = deadman timer is enabled bit 7-0 unimplemented: read as 0 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 142 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 143 dspic33evxxxgm00x/10x family 11.0 i/o ports many of the device pins are shared among the peripherals and the parallel i/o ports. all i/o input ports feature schmitt trigger inputs for improved noise immunity. all the pins in the device are 5v tolerant pins. 11.1 parallel i/o (pio) ports generally, a parallel i/o port that shares a pin with a peripheral is subservient to the peripheral. the peripherals output buffer data and control signals are provided to a pair of multiplexers. the multiplexers select whether the peripheral or the associated port has ownership of the output data and control signals of the i/o pin. the logic also prevents loop through, in which a ports digital output can drive the input of a peripheral that shares the same pin. figure 11-1 illustrates how ports are shared with other peripherals and the associated i/o pin to which they are connected. when a peripheral is enabled and the peripheral is actively driving an associated pin, the use of the pin as a general purpose output pin is disabled. the i/o pin can be read, but the output driver for the parallel port bit is disabled. if a peripheral is enabled, but the peripheral is not actively driving a pin, that pin can be driven by a port. all port pins have eight registers directly associated with their operation as digital i/o. the data direction register (trisx) determines whether the pin is an input or an output. if the data direction register bit is a 1 , then the pin is an input. all port pins are defined as inputs after a reset. reads from the latch (latx), read the latch; writes to the latch, write the latch. reads from the port (portx), read the port pins, while writes to the port pins, write the latch. any bit and its associated data and control registers that are not valid for a particular device are disabled. this means that the corresponding latx and trisx registers, and the port pin are read as zeros. when a pin is shared with another peripheral or function that is defined as an input only, it is nevertheless regarded as a dedicated port, because there is no other competing source of output. figure 11-1: block diagram of a typical shared port structure note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to i/o ports (ds70000598) in the dspic33/pic24 family reference man- ual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. q d ck wr latx + trisx latch i/o pin wr portx data bus q d ck data latch read portx read trisx 10 1 0 wr trisx peripheral output data output enable peripheral input data i/o peripheral module peripheral output enable pio module output multiplexers output data input data peripheral module enable read latx downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 144 ? 2013-2015 microchip technology inc. 11.1.1 open-drain configuration in addition to the portx, latx and trisx registers for data control, port pins can also be individually configured for either digital or open-drain outputs. this is controlled by the open-drain control x register (odcx) associated with each port. setting any of the bits configures the corresponding pin to act as an open-drain output. the open-drain feature allows the generation of outputs other than v dd by using external pull-up resistors. the maximum open-drain voltage allowed on any pin is the same as the maximum v ih specification for that particular pin. see table 30-10 in section 30.0 electrical charac- teristics for the maximum v ih specification of each pin. 11.2 configuring analog and digital port pins the anselx registers control the operation of the analog port pins. the port pins that are to function as analog inputs or outputs must have their corresponding anselx and trisx bits set. in order to use port pins for i/o functionality with digital modules, such as timers, uarts, etc., the corresponding anselx bits must be cleared. the anselx register has a default value of 0xffff. therefore, all pins that share analog functions are analog (not digital) by default. pins with analog functions affected by the anselx registers are listed with a buffer type of analog in the pinout i/o descriptions table (see ta bl e 1 - 1 in section 1.0 device overview ). if the trisx bit is cleared (output) while the anselx bit is set, the digital output level (v oh or v ol ) is converted by an analog peripheral, such as the adc module or comparator module. when the portx register is read, all pins configured as analog input channels are read as cleared (a low level). pins configured as digital inputs do not convert an analog input. analog levels on any pin defined as a digital input (including the anx pins) can cause the input buffer to consume current that exceeds the device specifications. 11.2.1 i/o port write/read timing one instruction cycle is required between a port direction change or port write operation and a read operation of the same port. typically, this instruction would be a nop , as shown in example 11-1 . 11.3 input change notification (icn) the input change notification function (icn) of the i/o ports allows devices to generate interrupt requests to the processor in response to a change-of-state (cos) on selected input pins. this feature can detect input change-of-states, even in sleep mode, when the clocks are disabled. every i/o port pin can be selected (enabled) for generating an interrupt request on a change-of-state. three control registers are associated with the icn functionality of each i/o port. the cnenx registers contain the icn interrupt enable control bits for each of the input pins. setting any of these bits enables an icn interrupt for the corresponding pins. each i/o pin also has a weak pull-up and a weak pull- down connected to it. the pull-ups and pull-downs act as a current source or sink source connected to the pin, and eliminate the need for external resistors when push button or keypad devices are connected. the pull-ups and pull-downs are enabled separately using the cnpux and the cnpdx registers, which contain the control bits for each of the pins. setting any of the control bits enables the weak pull-ups and/or pull-downs for the corresponding pins. example 11-1: port write/read example note: the pull-ups and pull-downs on icn pins should always be disabled when the port pin is configured as a digital output. mov 0xff00, w0 ; configure portb<15:8> ; as inputs mov w0, trisb ; and portb<7:0> ; as outputs nop ; delay 1 cycle btss portb, #13 ; next instruction downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 145 dspic33evxxxgm00x/10x family 11.4 slew rate selection the slew rate selection feature allows the device to have control over the slew rate selection on the required i/o pin which supports this feature. for this purpose, for each i/o port, there are two registers: sr1x and sr0x, which configure the selection of the slew rate. the register outputs are directly connected to the associated i/o pins, which support the slew rate selection function. the sr1x register specifies the msb and the sr0x register provides the lsb of the 2-bit field that selects the desired slew rate. for example, slew rate selections for porta are as follows: example 11-2: slew rate selections for porta 11.5 peripheral pin select (pps) a major challenge in general purpose devices is provid- ing the largest possible set of peripheral features while minimizing the conflict of features on i/o pins. the challenge is even greater on low pin count devices. in an application where more than one peripheral needs to be assigned to a single pin, inconvenient work arounds in application code, or a complete redesign, may be the only option. the peripheral pin select (pps) configuration provides an alternative to these choices by enabling peripheral set selection and their placement on a wide range of i/o pins. by increasing the pinout options available on a par- ticular device, users can better tailor the device to their entire application, rather than trimming the application to fit the device. the pps configuration feature operates over a fixed subset of digital i/o pins. users may independently map the input and/or output of most digital peripherals to any one of these i/o pins. hardware safeguards are included that prevent accidental or spurious changes to the peripheral mapping after it has been established. 11.5.1 available pins the number of available pins is dependent on the par- ticular device and its pin count. pins that support the pps feature include the designation, rpn or rpin, in their full pin designation, where n is the remappable pin number. rp is used to designate pins that support both remappable input and output functions, while rpi indicates pins that support remappable input functions only. 11.5.2 available peripherals the peripherals managed by the pps are all digital only peripherals. these include general serial commu- nications (uart and spi), general purpose timer clock inputs, timer related peripherals (input capture and output compare) and interrupt-on-change (ioc) inputs. in comparison, some digital only peripheral modules are never included in the pps feature, because the peripherals function requires special i/o circuitry on a specific port and cannot be easily connected to multiple pins. these modules include i 2 c and the pwm. a similar requirement excludes all modules with analog inputs, such as the adc converter. a key difference between the remappable and non- remappable peripherals is that the remappable peripherals are not associated with a default i/o pin. the peripheral must always be assigned to a specific i/o pin before it can be used. in contrast, the non-remappable peripherals are always available on a default pin, assuming that the peripheral is active and not conflicting with another peripheral. when a remappable peripheral is active on a given i/o pin, it takes priority over all the other digital i/o and digital communication peripherals associated with the pin. pri- ority is given regardless of the type of peripheral that is mapped. remappable peripherals never take priority over any analog functions associated with the pin. 11.5.3 controlling peripheral pin select the pps features are controlled through two sets of sfrs: one to map the peripheral inputs and the other to map the outputs. because they are separately con- trolled, a particular peripherals input and output (if the peripheral has both) can be placed on any selectable function pin without constraint. the association of a peripheral to a peripheral-selectable pin is handled in two different ways, depending on whether an input or output is being mapped. 11.5.4 input mapping the inputs of th e pps options are mapped on the basis of the peripheral. that is, a control register associated with a peripheral dictates the pin it will be mapped to. the rpinrx registers are used to configure peripheral input mapping (see table 11-1 and register 11-1 through register 11-17 ). each register contains sets of 8-bit fields, with each set associated with one of the remap- pable peripherals. programming a given peripherals bit field with an appropriate 8-bit value maps the rpn pin with the corresponding value to that peripheral. for any given device, the valid range of values for any bit field corresponds to the maximum number of peripheral pin selects supported by the device. sr1ax, sr0ax = 00 = fastest slew rate sr1ax, sr0ax = 01 = 4x slower slew rate sr1ax, sr0ax = 10 = 8x slower slew rate sr1ax, sr0ax = 11 = 16x slower slew rate downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 146 ? 2013-2015 microchip technology inc. for example, figure 11-2 shows the remappable pin selection for the u1rx input. figure 11-2: remappable input for u1rx 11.5.4.1 virtual connections dspic33evxxxgm00x/10x family devices support virtual (internal) connections to the output of the op amp/comparator module (see figure 25-1 in section 25.0 op amp/comparator module ). these devices provide six virtual output pins (rpv0- rpv5) that correspond to the outputs of six peripheral pin output remapper blocks (rp176-rp181). the six virtual remapper outputs (rp176-rp181) are not con- nected to actual pins. the six virtual pins may be read by any of the input remappers as inputs, rpi176- rpi181. these virtual pins can be used to connect the internal peripherals, whose signals are of significant use to the other peripherals, but these output signals are not present on the device pin. virtual connections provide a simple way of inter- peripheral connection without utilizing a physical pin. for example, by setting the flt1r<6:0> bits of the rpinr12 register to the value of b0000001 , the output of the analog comparator, c1out, will be connected to the pwm fault 1 input, which allows the analog comparator to trigger pwm faults without the use of an actual physical pin on the device. rp0 rp1 rp3 0 12 u1rx input u1rxr<6:0> to peripheral rpn n note: for input only, pps functionality does not have priority over trisx settings. there- fore, when configuring an rpn pin for input, the corresponding bit in the trisx register must also be configured for input (set to 1 ). downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 147 dspic33evxxxgm00x/10x family table 11-1: selectable input sources (maps input to function) input name ( 1 ) function name register configuration bits external interrupt 1 int1 rpinr0 int1r<7:0> external interrupt 2 int2 rpinr1 int2r<7:0> timer2 external clock t2ck rpinr3 t2ckr<7:0> input capture 1 ic1 rpinr7 ic1r<7:0> input capture 2 ic2 rpinr7 ic2r<7:0> input capture 3 ic3 rpinr8 ic3r<7:0> input capture 4 ic4 rpinr8 ic4r<7:0> output compare fault a ocfa rpinr11 ocfar<7:0> pwm fault 1 flt1 rpinr12 flt1r<7:0> pwm fault 2 flt2 rpinr12 flt2r<7:0> uart1 receive u1rx rpinr18 u1rxr<7:0> uart2 receive u2rx rpinr19 u2rxr<7:0> spi2 data input sdi2 rpinr22 sdi2r<7:0> spi2 clock input sck2 rpinr22 sck2r<7:0> spi2 slave select ss2 rpinr23 ss2r<7:0> can1 receive c1rx rpinr26 c1rxr<7:0> pwm sync input 1 synci1 rpinr37 synci1r<7:0> pwm dead-time compensation 1 dtcmp1 rpinr38 dtcmp1r<7:0> pwm dead-time compensation 2 dtcmp2 rpinr39 dtcmp2r<7:0> pwm dead-time compensation 3 dtcmp3 rpinr39 dtcmp3r<7:0> sent1 input sent1r rpinr44 sent1r<7:0> sent2 input sent2r rpinr45 sent2r<7:0> note 1: unless otherwise noted, all inputs use the schmitt trigger input buffers. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 148 ? 2013-2015 microchip technology inc. table 11-2: input pin selection for selectable input sources peripheral pin select input register value input/ output pin assignment peripheral pin select input register value input/ output pin assignment 000 0000 iv ss 011 0010 ir p i 5 0 000 0001 ic m p 1 ( 1 ) 011 0011 ir p i 5 1 000 0010 ic m p 2 ( 1 ) 011 0100 ir p i 5 2 000 0011 ic m p 3 ( 1 ) 011 0101 ir p i 5 3 000 0100 ic m p 4 ( 1 ) 011 0110 i/o rp54 000 0101 011 0111 i/o rp55 000 1100 ic m p 5 ( 1 ) 011 1000 i/o rp56 000 1101 011 1001 i/o rp57 000 1110 011 1010 ir p i 5 8 000 1111 011 1011 001 0000 ir p i 1 6 011 1100 ir p i 6 0 001 0001 ir p i 1 7 011 1101 ir p i 6 1 001 0010 ir p i 1 8 011 1110 001 0011 ir p i 1 9 011 1111 ir p i 6 3 001 0100 i/o rp20 100 0000 001 0101 100 0001 001 0110 100 0010 001 0111 100 0011 001 1000 ir p i 2 4 100 0100 001 1001 ir p i 2 5 100 0101 i/o rp69 001 1010 100 0110 i/o rp70 001 1011 ir p i 2 7 100 0111 001 1100 ir p i 2 8 100 1000 ir p i 7 2 001 1101 100 1001 001 1110 100 1010 001 1111 100 1011 010 0000 ir p i 3 2 100 1110 010 0001 ir p i 3 3 100 1111 010 0010 ir p i 3 4 101 0010 010 0011 i/o rp35 101 0011 010 0100 i/o rp36 101 0100 010 0101 i/o rp37 010 1001 i/o rp41 010 0110 i/o rp38 010 1010 i/o rp42 010 0111 i/o rp39 010 1011 i/o rp43 010 1000 i/o rp40 101 1000 010 1100 ir p i 4 4 101 1001 010 1101 ir p i 4 5 101 1010 010 1110 ir p i 4 6 101 1011 010 1111 ir p i 4 7 101 1100 011 0000 i/o rp48 101 1101 legend: shaded rows indicate the pps input register values that are unimplemented. note 1: these are virtual pins. see section 11.5.4.1 virtual connections for more information on selecting this pin assignment. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 149 dspic33evxxxgm00x/10x family 11.5.5 output mapping in contrast to inputs, the outputs of the pps options are mapped on the basis of the pin. in this case, a control register associated with a particular pin dictates the peripheral output to be mapped. the rporx registers are used to control output mapping. like the rpinrx reg- isters, each register contains sets of 6-bit fields, with each set associated with one rpn pin (see register 11-18 to register 11-31 ). the value of the bit field corresponds to one of the peripherals and that peripherals output is mapped to the pin (see table 11-3 and figure 11-3 ). a null output is associated with the output register reset value of 0 . this is done to ensure that remap- pable outputs remain disconnected from all output pins by default. figure 11-3: multiplexing remappable output for rpn 011 0001 i/o rp49 101 1110 ir p i 9 4 110 0000 ir p i 9 6 101 1111 ir p i 9 5 110 0001 i/o rp97 111 0011 110 0010 111 0100 110 0011 111 0101 110 0100 111 0110 i/o rp118 110 0101 111 0111 ir p i 1 1 9 110 0110 111 1000 i/o rp120 110 0111 111 1001 ir p i 1 2 1 110 1000 111 1010 110 1001 111 1011 110 1010 111 1100 ir p i 1 2 4 110 1011 111 1101 i/o rp125 101 0101 111 1110 i/o rp126 101 0110 111 1111 i/o rp127 101 0111 10110000 i/o rp176 ( 1 ) 110 1100 10110001 i/o rp177 ( 1 ) 110 1101 10110010 i/o rp178 ( 1 ) 110 1110 10110011 i/o rp179 ( 1 ) 110 1111 10110100 i/o rp180 ( 1 ) 111 0010 10110101 i/o rp181 ( 1 ) table 11-2: input pin selection for selectable input sources (continued) peripheral pin select input register value input/ output pin assignment peripheral pin select input register value input/ output pin assignment legend: shaded rows indicate the pps input register values that are unimplemented. note 1: these are virtual pins. see section 11.5.4.1 virtual connections for more information on selecting this pin assignment. rpnr<5:0> 049 1 default u1tx output sdo2 output 2 refclko output output data rpn downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 150 ? 2013-2015 microchip technology inc. 11.5.5.1 mapping limitations the control schema of the peripheral select pins is not limited to a small range of fixed peripheral configura- tions. there are no mutual or hardware-enforced lockouts between any of the peripheral mapping sfrs. literally any combination of peripheral mappings across any or all of the rpn pins is possible. this includes both many-to-one, and one-to-many map- pings of peripheral inputs and outputs to pins. while such mappings may be technically possible from a con- figuration point of view, they may not be supportable from an electrical point of view. table 11-3: output selection for remappable pins (rpn) function rpnr<5:0> output name default port 000000 rpn tied to default pin u1tx 000001 rpn tied to uart1 transmit u2tx 000011 rpn tied to uart2 transmit sdo2 001000 rpn tied to spi2 data output sck2 001001 rpn tied to spi2 clock output ss2 001010 rpn tied to spi2 slave select c1tx 001110 rpn tied to can1 transmit oc1 010000 rpn tied to output compare 1 output oc2 010001 rpn tied to output compare 2 output oc3 010010 rpn tied to output compare 3 output oc4 010011 rpn tied to output compare 4 output c1out 011000 rpn tied to comparator output 1 c2out 011001 rpn tied to comparator output 2 c3out 011010 rpn tied to comparator output 3 synco1 101101 rpn tied to pwm primary time base sync output refclko 110001 rpn tied to reference clock output c4out 110010 rpn tied to comparator output 4 c5out 110011 rpn tied to comparator output 5 sent1 111001 rpn tied to sent out 1 sent2 111010 rpn tied to sent out 2 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 151 dspic33evxxxgm00x/10x family 11.6 high-voltage detect (hvd) dspic33evxxxgm00x/10x devices contain high- voltage detection (hvd) which monitors the v cap volt- age. the hvd is used to monitor the v cap supply voltage to ensure that an external connection does not raise the value above a safe level (~2.4v). if high core voltage is detected, all i/os are disabled and put in a tri- state condition. the device remains in this i/o tri-state condition as long as the high-voltage condition is present. 11.7 i/o helpful tips 1. in some cases, certain pins, as defined in table 30-10 under injection current, have internal protection diodes to v dd and v ss . the term, injection current, is also referred to as clamp current. on designated pins with suffi- cient external current-limiting precautions by the user, i/o pin input voltages are allowed to be greater or less than the data sheet absolute maximum ratings, with respect to the v ss and v dd supplies. note that when the user applica- tion forward biases either of the high or low side internal input clamp diodes that the resulting current being injected into the device, that is clamped internally by the v dd and v ss power rails, may affect the adc accuracy by four to six counts. 2. i/o pins that are shared with any analog input pin (i.e., anx) are always analog pins by default after any reset. consequently, configuring a pin as an analog input pin automatically disables the digital input pin buffer and any attempt to read the digital input level by reading portx or latx will always return a 0 , regardless of the digital logic level on the pin. to use a pin as a digital i/o pin on a shared anx pin, the user application needs to configure the analog pin configuration registers in the i/o ports module (i.e., anselx) by setting the appropriate bit that corresponds to that i/o port pin to a 0 . 3. most i/o pins have multiple functions. referring to the device pin diagrams in this data sheet, the priorities of the functions allocated to any pins are indicated by reading the pin name, from left- to-right. the left most function name takes precedence over any function to its right in the naming convention; for example, an16/t2ck/ t7ck/rc1. this indicates that an16 is the high- est priority in this example and will supersede all other functions to its right in the list. those other functions to its right, even if enabled, would not work as long as any other function to its left was enabled. this rule applies to all of the functions listed for a given pin. 4. each pin has an internal weak pull-up resistor and pull-down resistor that can be configured using the cnpux and cnpdx registers, respec- tively. these resistors eliminate the need for external resistors in certain applications. the internal pull-up is up to ~(v dd C 0.8), not v dd . this value is still above the minimum v ih of cmos and ttl devices. 5. when driving leds directly, the i/o pin can source or sink more current than what is specified in the v oh /i oh and v ol /i ol dc charac- teristic specifications. the respective i oh and i ol current rating only applies to maintaining the corresponding output at or above the v oh , and at or below the v ol levels. however, for leds, unlike digital inputs of an externally connected device, they are not governed by the same min- imum v ih /v il levels. an i/o pin output can safely sink or source any current less than that listed in the absolute maximum rating section of this data sheet. for example: v oh = 4.4v at i oh = -8 ma and v dd = 5v the maximum output current sourced by any 8 ma i/o pin = 12 ma. led source current, <12 ma, is technically permitted. for more information, refer to the v oh / i oh specifications in section 30.0 electrical characteristics . note: although it is not possible to use a digital input pin when its analog function is enabled, it is possible to use the digital i/o output function, trisx = 0x0 , while the analog function is also enabled. however, this is not recommended, particularly if the analog input is connected to an external analog voltage source, which would create signal contention between the analog signal and the output pin driver. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 152 ? 2013-2015 microchip technology inc. 6. the pps pin mapping rules are as follows: only one output function can be active on a given pin at any time, regardless if it is a dedicated or remappable function (one pin, one output). it is possible to assign a remappable output function to multiple pins and externally short or tie them together for increased current drive. if any dedicated output function is enabled on a pin, it will take precedence over any remappable output function. if any dedicated digital (input or output) function is enabled on a pin, any number of input remappable functions can be mapped to the same pin. if any dedicated analog function(s) are enabled on a given pin, digital input(s) of any kind will all be disabled, although a single digital output, at the users cautionary dis- cretion, can be enabled and active as long as there is no signal contention with an external analog input signal. for example, it is possible for the adc to convert the digital output logic level, or to toggle a digital output on a comparator or adc input provided there is no external analog input, such as for a built-in self-test. any number of input remappable functions can be mapped to the same pin(s) at the same time, including to any pin with a single output from either a dedicated or remappable output. the trisx registers control only the digital i/o output buffer. any other dedicated or remappable active output will automatically override the trisx setting. the trisx regis- ter does not control the digital logic input buffer. remappable digital inputs do not automatically override trisx settings, which means that the trisx bit must be set to input for pins with only remappable input function(s) assigned all analog pins are enabled by default after any reset and the corresponding digital input buffer on the pin is disabled. only the analog pin select registers control the digital input buffer, not the trisx register. the user must disable the analog function on a pin using the analog pin select registers in order to use any digital input(s) on a corresponding pin; no exceptions. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 153 dspic33evxxxgm00x/10x family 11.8 peripheral pin select registers register 11-1: rpinr0: peripheral pin select input register 0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 int1r<7:0> bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 int1r<7:0>: assign external interrupt 1 (int1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 unimplemented: read as 0 register 11-2: rpinr1: peripheral pin select input register 1 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 int2r<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 int2r<7:0>: assign external interrupt 2 (int2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 154 ? 2013-2015 microchip technology inc. register 11-3: rpinr3: peripheral pin select input register 3 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 t2ckr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 t2ckr<7:0>: assign timer2 external clock (t2ck) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 155 dspic33evxxxgm00x/10x family register 11-4: rpinr7: peripheral pin select input register 7 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic2r7 ic2r6 ic2r5 ic2r4 ic2r3 ic2r2 ic2r1 ic2r0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic1r7 ic1r6 ic1r5 ic1r4 ic1r3 ic1r2 ic1r1 ic1r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 ic2r<7:0>: assign input capture 2 (ic2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 ic1r<7:0>: assign input capture 1 (ic1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 156 ? 2013-2015 microchip technology inc. register 11-5: rpinr8: peripheral pin select input register 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic4r7 ic4r6 ic4r5 ic4r4 ic4r3 ic4r2 ic4r1 ic4r0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ic3r7 ic3r6 ic3r5 ic3r4 ic3r3 ic3r2 ic3r1 ic3r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 ic4r<7:0>: assign input capture 4 (ic4) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 ic3r<7:0>: assign input capture 3 (ic3) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 157 dspic33evxxxgm00x/10x family register 11-6: rpinr11: peripheral pin select input register 11 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ocfar<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 ocfar<7:0>: assign output compare fault a (ocfa) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 158 ? 2013-2015 microchip technology inc. register 11-7: rpinr12: peripheral pin select input register 12 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 flt2r7 flt2r6 flt2r5 flt2r4 flt2r3 flt2r2 flt2r1 flt2r0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 flt1r7 flt1r6 flt1r5 flt1r4 flt1r3 flt1r2 flt1r1 flt1r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 flt2r<7:0>: assign pwm fault 2 (flt2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 flt1r<7:0>: assign pwm fault 1 (flt1) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 159 dspic33evxxxgm00x/10x family register 11-8: rpinr18: peripheral pin select input register 18 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u1rxr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 u1rxr<7:0>: assign uart1 receive (u1rx) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss register 11-9: rpinr19: peripheral pin select input register 19 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u2rxr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 u2rxr<7:0>: assign uart2 receive (u2rx) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 160 ? 2013-2015 microchip technology inc. register 11-10: rpinr22: peripheral pin select input register 22 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sck2r7 sck2r6 sck2r5 sck2r4 sck2r3 sck2r2 sck2r1 sck2r0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sdi2r sdi2r6 sdi2r5 sdi2r4 sdi2r3 sdi2r2 sdi2r1 sdi2r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 sck2r <7:0>: assign spi2 clock input (sck2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 sdi2r <7:0>: assign spi2 data input (sdi2) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 161 dspic33evxxxgm00x/10x family register 11-11: rpinr23: peripheral pin select input register 23 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ss2r<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 ss2r <7:0>: assign spi2 slave select (ss2 ) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss register 11-12: rpinr26: peripheral pin select input register 26 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 c1rxr<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 c1rxr<7:0>: assign can1 rx input (c1rx) to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 162 ? 2013-2015 microchip technology inc. register 11-13: rpinr37: peripheral pin select input register 37 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 synci1r<7:0> bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 synci1r<7:0>: assign pwm synchronization input 1 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 unimplemented: read as 0 register 11-14: rpinr38: peripheral pin select input register 38 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dtcmp1r<7:0> bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 dtcmp1r<7:0>: assign pwm dead-time compensation input 1 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 unimplemented: read as 0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 163 dspic33evxxxgm00x/10x family register 11-15: rpinr39: peripheral pin select input register 39 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dtcmp3r7 dtcmp3r6 dtcmp3r5 dtcmp3r4 dtcmp3r3 dtcmp3r2 dtcmp3r1 dtcmp3r0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dtcmp2r7 dtcmp2r6 dtcmp2r5 dtcmp2r4 dtcmp2r3 dtcmp2r2 dtcmp2r1 dtcmp2r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 dtcmp3r<7:0>: assign pwm dead-time compensation input 3 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 dtcmp2r<7:0>: assign pwm dead-time compensation input 2 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 164 ? 2013-2015 microchip technology inc. register 11-16: rpinr44: peripheral pin select input register 44 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sent1r<7:0> bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 sent1r<7:0>: assign sent module input 1 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss bit 7-0 unimplemented: read as 0 register 11-17: rpinr45: peripheral pin select input register 45 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sent2r<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 sent2r<7:0>: assign sent module input 2 to the corresponding rpn pin bits (see table 11-2 for input pin selection numbers) 10110101 = input tied to rpi181 00000001 = input tied to cmp1 00000000 = input tied to v ss downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 165 dspic33evxxxgm00x/10x family register 11-18: rpor0: peripheral pin select output register 0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp35r5 rp35r4 rp35r3 rp35r2 rp35r1 rp35r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp20r5 rp20r4 rp20r3 rp20r2 rp20r1 rp20r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp35r<5:0>: peripheral output function is assigned to rp35 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp20r<5:0>: peripheral output function is assigned to rp20 output pin bits (see table 11-3 for peripheral function numbers) register 11-19: rpor1: peripheral pin select output register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp37r5 rp37r4 rp37r3 rp37r2 rp37r1 rp37r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp36r5 rp36r4 rp36r3 rp36r2 rp36r1 rp36r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp37r<5:0>: peripheral output function is assigned to rp37 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp36r<5:0>: peripheral output function is assigned to rp36 output pin bits (see table 11-3 for peripheral function numbers) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 166 ? 2013-2015 microchip technology inc. register 11-20: rpor2: peripheral pin select output register 2 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp39r5 rp39r4 rp39r3 rp39r2 rp39r1 rp39r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp38r5 rp38r4 rp38r3 rp38r2 rp38r1 rp38r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp39r<5:0>: peripheral output function is assigned to rp39 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp38r<5:0>: peripheral output function is assigned to rp38 output pin bits (see table 11-3 for peripheral function numbers) register 11-21: rpor3: peripheral pin select output register 3 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp41r5 rp41r4 rp41r3 rp41r2 rp41r1 rp41r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp40r5 rp40r4 rp40r3 rp40r2 rp40r1 rp40r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp41r<5:0>: peripheral output function is assigned to rp41 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp40r<5:0>: peripheral output function is assigned to rp40 output pin bits (see table 11-3 for peripheral function numbers) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 167 dspic33evxxxgm00x/10x family register 11-22: rpor4: peripheral pin select output register 4 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp43r5 rp43r4 rp43r3 rp43r2 rp43r1 rp43r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp42r5 rp42r4 rp42r3 rp42r2 rp42r1 rp42r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp43r<5:0>: peripheral output function is assigned to rp43 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp42r<5:0>: peripheral output function is assigned to rp42 output pin bits (see table 11-3 for peripheral function numbers) register 11-23: rpor5: peripheral pin select output register 5 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp49r5 rp49r4 rp49r3 rp49r2 rp49r1 rp49r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp48r5 rp48r4 rp48r3 rp48r2 rp48r1 rp48r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp49r<5:0>: peripheral output function is assigned to rp49 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp48r<5:0>: peripheral output function is assigned to rp48 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is present in dspic33evxxxgm004/104/006/106 devices only. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 168 ? 2013-2015 microchip technology inc. register 11-24: rpor6: peripheral pin select output register 6 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp55r5 rp55r4 rp55r3 rp55r2 rp55r1 rp55r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp54r5 rp54r4 rp54r3 rp54r2 rp54r1 rp54r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp55r<5:0>: peripheral output function is assigned to rp55 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp54r<5:0>: peripheral output function is assigned to rp54 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is present in dspic33evxxxgm004/104/006/106 devices only register 11-25: rpor7: peripheral pin select output register 7 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp57r5 rp57r4 rp57r3 rp57r2 rp57r1 rp57r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp56r5 rp56r4 rp56r3 rp56r2 rp56r1 rp56r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp57r<5:0>: peripheral output function is assigned to rp57 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp56r<5:0>: peripheral output function is assigned to rp56 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is present in dspic33evxxxgm004/104/006/106 devices only. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 169 dspic33evxxxgm00x/10x family register 11-26: rpor8: peripheral pin select output register 8 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp70r5 rp70r4 rp70r3 rp70r2 rp70r1 rp70r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp69r5 rp69r4 rp69r3 rp69r2 rp69r1 rp69r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp70r<5:0>: peripheral output function is assigned to rp70 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp69r<5:0>: peripheral output function is assigned to rp69 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is present in dspic33evxxxgm004/104/006/106 devices only. register 11-27: rpor9: peripheral pin select output register 9 ( 1 ) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp118r5 rp118r4 rp118r3 rp118r2 rp118r1 rp118r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp97r5 rp97r4 rp97r3 rp97r2 rp97r1 rp97r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp118r<5:0>: peripheral output function is assigned to rp118 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp97r<5:0>: peripheral output function is assigned to rp97 output pin bits (see table 11-3 for peripheral function numbers) note 1: this register is present in dspic33evxxxgm004/106 devices only. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 170 ? 2013-2015 microchip technology inc. register 11-28: rpor10: peripheral pin select output register 10 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp176r5 rp176r4 rp176r3 rp176r2 rp176r1 rp176r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp120r5 ( 1 ) rp120r4 ( 1 ) rp120r3 ( 1 ) rp120r2 ( 1 ) rp120r1 ( 1 ) rp120r0 ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp176r<5:0>: peripheral output function is assigned to rp176 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp120r<5:0>: peripheral output function is assigned to rp120 output pin bits ( 1 ) (see table 11-3 for peripheral function numbers) note 1: rp120r<5:0> is present in dspic33evxxxgm006/106 devices only. register 11-29: rpor11: peripheral pin select output register 11 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp178r5 rp178r4 rp178r3 rp178r2 rp178r1 rp178r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp177r5 rp177r4 rp177r3 rp177r2 rp177r1 rp177r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp178r<5:0>: peripheral output function is assigned to rp178 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp177r<5:0>: peripheral output function is assigned to rp177 output pin bits (see table 11-3 for peripheral function numbers) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 171 dspic33evxxxgm00x/10x family register 11-30: rpor12: peripheral pin select output register 12 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp180r5 rp180r4 rp180r3 rp180r2 rp180r1 rp180r0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp179r5 rp179r4 rp179r3 rp179r2 rp179r1 rp179r0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 rp180r<5:0>: peripheral output function is assigned to rp180 output pin bits (see table 11-3 for peripheral function numbers) bit 7-6 unimplemented: read as 0 bit 5-0 rp179r<5:0>: peripheral output function is assigned to rp179 output pin bits (see table 11-3 for peripheral function numbers) register 11-31: rpor13: peripheral pin select output register 13 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 rp181r<5:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-6 unimplemented: read as 0 bit 5-0 rp181r<5:0>: peripheral output function is assigned to rp181 output pin bits (see table 11-3 for peripheral function numbers) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 172 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 173 dspic33evxxxgm00x/10x family 12.0 timer1 the timer1 module is a 16-bit timer that can operate as a free-running, interval timer/counter. the timer1 module has the following unique features over other timers: can be operated in asynchronous counter mode from an external clock source the timer1 external clock input (t1ck) can optionally be synchronized to the internal device clock and the clock synchronization is performed after the prescaler a block diagram of timer1 is shown in figure 12-1 . the timer1 module can operate in one of the following modes: timer mode gated timer mode synchronous counter mode asynchronous counter mode in timer and gated timer modes, the input clock is derived from the internal instruction cycle clock (f cy ). in synchronous and asynchronous counter modes, the input clock is derived from the external clock input at the t1ck pin. the timer modes are determined by the following bits: timer clock source control bit (tcs): t1con<1> timer synchronization control bit (tsync): t1con<2> timer gate control bit (tgate): t1con<6> timer control bit settings for different operating modes are given in table 12-1 . table 12-1: timer mode settings figure 12-1: 16-bit time r1 module block diagram note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to timers (ds70362) in the dspic33/pic24 family reference man- ual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. mode tcs tgate tsync timer 00x gated timer 01x synchronous counter 1x1 asynchronous counter 1x0 tgate tcs 00 10x1 tgate set t1if flag 0 1 tsync 1 0 sync equal reset t1ck prescaler (/n) tckps<1:0> gate sync f p (1) falling edge detect tckps<1:0> note 1: f p is the peripheral clock. latch data clk t1clk ctmu edge control logic tmr1 comparator prescaler (/n) pr1 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 174 ? 2013-2015 microchip technology inc. 12.1 timer1 control register register 12-1: t1con: ti mer1 control register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton ( 1 ) t s i d l bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 u-0 tgate tckps1 tckps0 tsync ( 1 ) tcs ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ton: timer1 on bit ( 1 ) 1 = starts 16-bit timer1 0 = stops 16-bit timer1 bit 14 unimplemented: read as 0 bit 13 tsidl: timer1 stop in idle mode bit 1 = discontinues module operation when the device enters idle mode 0 = continues module operation in idle mode bit 12-7 unimplemented: read as 0 bit 6 tgate: timer1 gated time accumulation enable bit when tcs = 1 : this bit is ignored. when tcs = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timer1 input clock prescale select bits 11 = 1:256 10 = 1:64 01 = 1:8 00 = 1:1 bit 3 unimplemented: read as 0 bit 2 tsync: timer1 external clock input synchronization select bit ( 1 ) when tcs = 1 : 1 = external clock input is synchronized 0 = external clock input is not synchronized when tcs = 0 : this bit is ignored. bit 1 tcs: timer1 clock source select bit ( 1 ) 1 = external clock is from pin, t1ck (on the rising edge) 0 = internal clock (f p ) bit 0 unimplemented: read as 0 note 1: when timer1 is enabled in external synchronous counter mode (tcs = 1 , tsync = 1 , ton = 1 ), any attempts by user software to write to the tmr1 register are ignored. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 175 dspic33evxxxgm00x/10x family 13.0 timer2/3 and timer4/5 these modules are 32-bit timers, which can also be configured as four independent, 16-bit timers with selectable operating modes. as a 32-bit timer, timer2/3 and timer4/5 operate in the following three modes: two independent 16-bit timers (e.g., timer2 and timer3) with all 16-bit operating modes (except asynchronous counter mode) single 32-bit timer single 32-bit synchronous counter they also support these features: timer gate operation selectable prescaler settings timer operation during idle and sleep modes interrupt on a 32-bit period register match time base for input capture and output compare modules adc1 event trigger (timer2/3 only) individually, all four of the 16-bit timers can function as synchronous timers or counters. they also offer the features listed previously, except for the event trigger; this is implemented only with timer2/3. the operating modes and enabled features are determined by setting the appropriate bit(s) in the t2con, t3con, t4con and t5con registers. t2con and t4con are shown in generic form in register 13-1 . the t3con and t5con registers are shown in register 13-2 . for 32-bit timer/counter operation, timer2 and timer4 are the least significant word (lsw). timer3 and timer5 are the most significant word (msw) of the 32-bit timers. block diagrams for the type b and type c timers are shown in figure 13-1 and figure 13-2 , respectively. a block diagram for an example 32-bit timer pair (timer2/3 and timer4/5) is shown in figure 13-3 . note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to timers (ds70362) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: for 32-bit operation, the t3con and t5con control bits are ignored. only the t2con and t4con control bits are used for setup and control. timer2 and timer4 clock and gate inputs are utilized for the 32-bit timer modules, but an interrupt is generated with the timer3 and timer5 interrupt flags. note: only timer2, timer3, timer4 and timer5 can trigger a dma data transfer. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 176 ? 2013-2015 microchip technology inc. figure 13-1: type b timer block diagram (x = 2 and 4) figure 13-2: type c timer block diagram (x = 3 and 5) note 1: f p is the peripheral clock. tgate tcs 00 10x1 tgate set txif flag 0 1 equal reset txck tckps<1:0> gate sync f p (1) falling edge detect tckps<1:0> latch data clk txclk tmrx comparator prescaler (/n) prescaler (/n) sync prx note 1: f p is the peripheral clock. 2: the adc trigger is available on tmr3 and tmr5 only. tgate tcs 00 10x1 tgate set txif flag 0 1 equal reset txck tckps<1:0> gate sync f p (1) falling edge detect tckps<1:0> latch data clk txclk tmrx comparator prescaler (/n) prescaler (/n) sync adc start of conversion prx trigger (2) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 177 dspic33evxxxgm00x/10x family figure 13-3: type b/type c timer pair block diagram (32-bit timer) tgate tcs 00 10x1 comparator tgate set tyif flag 0 1 equal reset txck tckps<1:0> f p (1) tckps<1:0> note 1: f p is the peripheral clock. 2: timerx is a type b timer (x = 2 and 4). 3: timery is a type c timer (y = 3 and 5). 4: the adc trigger is available only on the tmr3:tmr2 and tmr5:tmr4 32-bit timer pairs. latch data clk adc (4) prx tmryhld data bus<15:0> msw lsw prescaler (/n) prescaler (/n) sync gate sync falling edge detect pry tmrx (2) tmry (3) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 178 ? 2013-2015 microchip technology inc. 13.1 timer2/3 and timer4/5 control registers register 13-1: txcon (t2con and t4con) control register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton t s i d l bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 u-0 tgate tckps1 tckps0 t32 t c s ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ton: timerx on bit when t32 = 1 : 1 = starts 32-bit timerx/y 0 = stops 32-bit timerx/y when t32 = 0 : 1 = starts 16-bit timerx 0 = stops 16-bit timerx bit 14 unimplemented: read as 0 bit 13 tsidl: timerx stop in idle mode bit 1 = discontinues module operation when the device enters idle mode 0 = continues module operation in idle mode bit 12-7 unimplemented: read as 0 bit 6 tgate: timerx gated time accumulation enable bit when tcs = 1 : this bit is ignored. when tcs = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timerx input clock prescale select bits 11 = 1:256 10 = 1:64 01 = 1:8 00 = 1:1 bit 3 t32: 32-bit timer mode select bit 1 = timerx and timery form a single 32-bit timer 0 = timerx and timery act as two 16-bit timers bit 2 unimplemented: read as 0 bit 1 tcs: timerx clock source select bit ( 1 ) 1 = external clock is from pin, txck (on the rising edge) 0 = internal clock (f p ) bit 0 unimplemented: read as 0 note 1: the txck pin is not available on all timers. refer to the pin diagrams section for the available pins. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 179 dspic33evxxxgm00x/10x family register 13-2: tycon (t3con and t5con) control register r/w-0 u-0 r/w-0 u-0 u-0 u-0 u-0 u-0 ton ( 1 ) t s i d l ( 2 ) bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 u-0 u-0 r/w-0 u-0 t g a t e ( 1 ) tckps1 ( 1 ) tckps0 ( 1 ) t c s ( 1 , 3 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ton: timery on bit ( 1 ) 1 = starts 16-bit timery 0 = stops 16-bit timery bit 14 unimplemented: read as 0 bit 13 tsidl: timery stop in idle mode bit ( 2 ) 1 = discontinues module operation when the device enters an idle mode 0 = continues module operation in an idle mode bit 12-7 unimplemented: read as 0 bit 6 tgate: timery gated time accumulation enable bit ( 1 ) when tcs = 1 : this bit is ignored. when tcs = 0 : 1 = gated time accumulation is enabled 0 = gated time accumulation is disabled bit 5-4 tckps<1:0>: timery input clock prescale select bits ( 1 ) 11 = 1:256 10 = 1:64 01 = 1:8 00 = 1:1 bit 3-2 unimplemented: read as 0 bit 1 tcs: timery clock source select bit ( 1 , 3 ) 1 = external clock is from pin, tyck (on the rising edge) 0 = internal clock (f p ) bit 0 unimplemented: read as 0 note 1: when 32-bit operation is enabled (t2con<3> = 1 ), these bits have no effect on timery operation; all timer functions are set through txcon. 2: when 32-bit timer operation is enabled (t32 = 1 ) in the timerx control register (txcon<3>), the tsidl bit must be cleared to operate the 32-bit timer in idle mode. 3: the tyck pin is not available on all timers. see the pin diagrams section for the available pins. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 180 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 181 dspic33evxxxgm00x/10x family 14.0 deadman timer (dmt) the primary function of the deadman timer (dmt) is to reset the processor in the event of a software malfunc- tion. the dmt, which works on the system clock, is a free-running instruction fetch timer, which is clocked whenever an instruction fetch occurs, until a count match occurs. instructions are not fetched when the processor is in sleep mode. dmt can be enabled in the configuration fuse or by software in the dmtcon register by setting the on bit. the dmt consists of a 32-bit counter with a time-out count match value, as specified by the two 16-bit configuration fuse registers: fdmtcntl and fdmtcnth. a dmt is typically used in mission-critical, and safety- critical applications, where any single failure of the software functionality and sequencing must be detected. figure 14-1 shows a block diagram of the deadman timer module. figure 14-1: deadman timer block diagram note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to deadman timer (dmt) (ds70005155) in the dspic33/pic24 family reference manual , which is avail- able from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. 32-bit counter system clock dmt event instruction fetched strobe (2) improper sequence (counter) = dmt max count (1) note 1: dmt max count is controlled by the initial value of the fdmtcntl and fdmtcnth configuration registers. 2: dmt window interval is controlled by the value of the fdmtintvl and fdmtintvh configuration registers. flag dmt enable (1) bad1bad2 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 182 ? 2013-2015 microchip technology inc. 14.1 deadman timer control registers register 14-1: dmtcon: deadman timer control register r/w-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 on ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 on: dmt module enable bit ( 1 ) 1 = deadman timer module is enabled 0 = deadman timer module is not enabled bit 14-0 unimplemented: read as 0 note 1: this bit has control only when dmten = 0 in the fdmt register. register 14-2: dmtpreclr: deadman timer preclear register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 step1<7:0> bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 step1<7:0>: dmt preclear enable bits 01000000 = enables the deadman timer preclear (step 1) all other write patterns = sets the bad1 flag; these bits are cleared when a dmt reset event occurs. step1<7:0> bits are also cleared if the step2<7:0> bits are loaded with the correct value in the correct sequence. bit 7-0 unimplemented: read as 0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 183 dspic33evxxxgm00x/10x family register 14-3: dmtclr: deadman timer clear register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 step2<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-0 step2<7:0>: dmt clear timer bits 00001000 = clears step1<7:0>, step2<7:0> and the deadman timer if preceded by the correct loading of the step1<7:0> bits in the correct sequence. the write to these bits may be verified by reading the dmtcntl/h register and observing the counter being reset. all other write patterns = sets the bad2 bit; the value of step1<7:0> will remain unchanged and the new value being written to step2<7:0> will be captured. these bits are cleared when a dmt reset event occurs. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 184 ? 2013-2015 microchip technology inc. register 14-4: dmtstat: deadman timer status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r-0, hc r-0, hc r-0, hc u-0 u-0 u-0 u-0 r-0 bad1 bad2 dmtevent w i n o p n bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7 bad1: deadman timer bad step1<7:0> value detect bit 1 = incorrect step1<7:0> value was detected 0 = incorrect step1<7:0> value was not detected bit 6 bad2: deadman timer bad step2<7:0> value detect bit 1 = incorrect step2<7:0> value was detected 0 = incorrect step2<7:0> value was not detected bit 5 dmtevent: deadman timer event bit 1 = deadman timer event was detected (counter expired, or bad step1<7:0> or step2<7:0> value was entered prior to counter increment) 0 = deadman timer event was not detected bit 4-1 unimplemented: read as 0 bit 0 winopn: deadman timer clear window bit 1 = deadman timer clear window is open 0 = deadman timer clear window is not open downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 185 dspic33evxxxgm00x/10x family register 14-5: dmtcntl: deadm an timer count register low r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 counter<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 counter<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 counter<15:0>: read current contents of lower dmt counter bits register 14-6: dmtcnth: deadm an timer count register high r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 counter<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 counter<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 counter<31:16>: read current contents of higher dmt counter bits downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 186 ? 2013-2015 microchip technology inc. register 14-7: dmtpscntl: dmt post co nfigure count stat us register low r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pscnt<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pscnt<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 pscnt<15:0>: lower dmt instruction count value configuration status bits this is always the value of the fdmtcntl configuration register. register 14-8: dmtpscnth: dmt post co nfigure count status register high r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pscnt<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pscnt<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 pscnt<31:16>: higher dmt instruction count value configuration status bits this is always the value of the fdmtcnth configuration register. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 187 dspic33evxxxgm00x/10x family register 14-9: dmtpsintvl: dmt post configure interval status register low r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 psintv<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 psintv<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 psintv<15:0>: lower dmt window interval configuration status bits this is always the value of the fdmtintvl configuration register. register 14-10: dmtpsintvh: dmt post co nfigure interval status register high r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 psintv<31:24> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 psintv<23:16> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 psintv<31:16>: higher dmt window interval configuration status bits this is always the value of the fdmtintvh configuration register. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 188 ? 2013-2015 microchip technology inc. register 14-11: dmtholdreg: dmt hold register ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 uprcnt<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 uprcnt<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 uprcnt<15:0>: value of the dmtcnth register when dmtcntl and dmtcnth were last read bits note 1: the dmtholdreg register is initialized to 0 on reset, and is only loaded when the dmtcntl and dmtcnth registers are read. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 189 dspic33evxxxgm00x/10x family 15.0 input capture the input capture module is useful in applications requiring frequency (period) and pulse measurement. the dspic33evxxxgm00x/10 x family devices support 4 input capture channels. key features of the input capture module include: hardware-configurable for 32-bit operation in all modes by cascading two adjacent modules synchronous and trigger modes of output compare operation, with up to 31 user-selectable trigger/sync sources available a 4-level fifo buffer for capturing and holding timer values for several events configurable interrupt generation up to six clock sources available for each module, driving a separate internal 16-bit counter figure 15-1 shows a block diagram of the input capture module. figure 15-1: input capture x module block diagram note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to input capture (ds70000352) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. icxbuf 4-level fifo buffer icx pin icm<2:0> set icxif edge detect logic ici<1:0> icov, icbne interrupt logic system bus prescaler counter 1:1/4/16 and clock synchronizer event and trigger and sync logic clock select icx clock sources trigger and sync sources ictsel<2:0> syncsel<4:0> trigger (1) 16 16 16 icxtmr increment reset note 1: the trigger/sync source is enabled by default and is set to timer3 as a source. this timer must be enabled for proper icx module operation or the trigger/sync s ource must be changed to another source option. ctmu edge control logic downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 190 ? 2013-2015 microchip technology inc. 15.1 input capture control registers register 15-1: icxcon1: input capture x control register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 icsidl ictsel2 ictsel1 ictsel0 bit 15 bit 8 u-0 r/w-0 r/w-0 r-0, hc, hs r-0, hc, hs r/w-0 r/w-0 r/w-0 ici1 ici0 icov icbne icm2 icm1 icm0 bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 icsidl: input capture x stop in idle mode control bit 1 = input capture x will halt in cpu idle mode 0 = input capture x will continue to operate in cpu idle mode bit 12-10 ictsel<2:0>: input capture x timer select bits 111 = peripheral clock (f p ) is the clock source of the icx 110 = reserved 101 = reserved 100 = t1clk is the clock source of the icx (only the synchronous clock is supported) 011 = t5clk is the clock source of the icx 010 = t4clk is the clock source of the icx 001 = t2clk is the clock source of the icx 000 = t3clk is the clock source of the icx bit 9-7 unimplemented: read as 0 bit 6-5 ici<1:0>: number of captures per interrupt select bits (this field is not used if icm<2:0> = 001 or 111 ) 11 = interrupt on every fourth capture event 10 = interrupt on every third capture event 01 = interrupt on every second capture event 00 = interrupt on every capture event bit 4 icov: input capture x overflow status flag bit (read-only) 1 = input capture x buffer overflow has occurred 0 = input capture x buffer overflow has not occurred bit 3 icbne: input capture x buffer not empty status bit (read-only) 1 = input capture x buffer is not empty, at least one more capture value can be read 0 = input capture x buffer is empty bit 2-0 icm<2:0>: input capture x mode select bits 111 = input capture x functions as an interrupt pin only in cpu sleep and idle modes (rising edge detect only, all other control bits are not applicable) 110 = unused (module is disabled) 101 = capture mode, every 16th rising edge (prescaler capture mode) 100 = capture mode, every 4th rising edge (prescaler capture mode) 011 = capture mode, every rising edge (simple capture mode) 010 = capture mode, every falling edge (simple capture mode) 001 = capture mode, every edge, rising and falling (edge detect mode (ici<1:0>) is not used in this mode) 000 = input capture x module is turned off downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 191 dspic33evxxxgm00x/10x family register 15-2: icxcon2: input capture x control register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 i c 3 2 ( 1 ) bit 15 bit 8 r/w-0 r/w-0, hs u-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-1 ictrig ( 2 ) trigstat ( 3 ) syncsel4 ( 4 ) syncsel3 ( 4 ) syncsel2 ( 4 ) syncsel1 ( 4 ) syncsel0 ( 4 ) bit 7 bit 0 legend: hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-9 unimplemented: read as 0 bit 8 ic32: input capture x 32-bit timer mode select bit (cascade mode) ( 1 ) 1 = odd icx and even icx form a single 32-bit input capture module 0 = cascade module operation is disabled bit 7 ictrig: input capture x trigger operation select bit ( 2 ) 1 = input source is used to trigger the input capture timer (trigger mode) 0 = input source is used to synchronize the input capture timer to the timer of another module (synchronization mode) bit 6 trigstat: timer trigger status bit ( 3 ) 1 = icxtmr has been triggered and is running 0 = icxtmr has not been triggered and is being held clear bit 5 unimplemented: read as 0 note 1: the ic32 bit in both the odd and even icx must be set to enable cascade mode. 2: the input source is selected by the syncsel<4:0> bits of the icxcon2 register. 3: this bit is set by the selected input source (selected by the syncsel<4:0> bits); it can be read, set and cleared in software. 4: do not use the icx module as its own sync or trigger source. 5: this option should only be selected as a trigger source and not as a synchronization source. 6: when the source icx timer rolls over, then in the next clock cycle, trigger or synchronization occurs. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 192 ? 2013-2015 microchip technology inc. bit 4-0 syncsel<4:0>: input source select for synchronization and trigger operation bits ( 4 ) 11111 = reserved 11110 = reserved 11101 = reserved 11100 = ctmu trigger is the source for the capture timer synchronization 11011 = adc1 interrupt is the source for the capture timer synchronization ( 5 ) 11010 = analog comparator 3 is the source for the capture timer synchronization ( 5 ) 11001 = analog comparator 2 is the source for the capture timer synchronization ( 5 ) 11000 = analog comparator 1 is the source for the capture timer synchronization ( 5 ) 10111 = analog comparator 5 is the source for the capture timer synchronization ( 5 ) 10110 = analog comparator 4 is the source for the capture timer synchronization ( 5 ) 10101 = reserved 10100 = reserved 10011 = input capture 4 interrupt is the source for the capture timer synchronization 10010 = input capture 3 interrupt is the source for the capture timer synchronization 10001 = input capture 2 interrupt is the source for the capture timer synchronization 10000 = input capture 1 interrupt is the source for the capture timer synchronization 01111 = gp timer5 is the source for the capture timer synchronization 01110 = gp timer4 is the source for the capture timer synchronization 01101 = gp timer3 is the source for the capture timer synchronization 01100 = gp timer2 is the source for the capture timer synchronization 01011 = gp timer1 is the source for the capture timer synchronization 01010 = reserved 01001 = reserved 01000 = input capture 4 is the source for the capture timer synchronization ( 6 ) 00111 = input capture 3 is the source for the capture timer synchronization ( 6 ) 00110 = input capture 2 is the source for the capture timer synchronization ( 6 ) 00101 = input capture 1 is the source for the capture timer synchronization ( 6 ) 00100 = output compare 4 is the source for the capture timer synchronization 00011 = output compare 3 is the source for the capture timer synchronization 00010 = output compare 2 is the source for the capture timer synchronization 00001 = output compare 1 is the source for the capture timer synchronization 00000 = reserved register 15-2: icxcon2: input capture x control register 2 (continued) note 1: the ic32 bit in both the odd and even icx must be set to enable cascade mode. 2: the input source is selected by the syncsel<4:0> bits of the icxcon2 register. 3: this bit is set by the selected input source (selected by the syncsel<4:0> bits); it can be read, set and cleared in software. 4: do not use the icx module as its own sync or trigger source. 5: this option should only be selected as a trigger source and not as a synchronization source. 6: when the source icx timer rolls over, then in the next clock cycle, trigger or synchronization occurs. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 193 dspic33evxxxgm00x/10x family 16.0 output compare the dspic33evxxxgm00x/10x family devices support up to 4 output compare modules. the output compare module can select one of eight available clock sources for its time base. the module compares the value of the timer with the value of one or two compare registers, depending on the operating mode selected. the state of the output pin changes when the timer value matches the compare register value. the output compare module generates either a single output pulse, or a sequence of output pulses, by changing the state of the output pin on the compare match events. the output compare module can also generate interrupts on compare match events and trigger dma data transfers. figure 16-1 shows a block diagram of the output compare module. figure 16-1: output compare x module block diagram note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to output compare (ds70005157) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: for more information on ocxr and ocxrs register restrictions, refer to the output compare (ds70005157) section in the dspic33/pic24 family reference manual . ocxr buffer comparator ocxtmr ocxcon1 ocxcon2 ocx interrupt ocx pin ocxrs buffer comparator match match trigger and sync logic clock select increment reset ocx clock sources trigger and sync sources reset match event ocfa ocxr ocxrs event event rollover rollover/reset rollover/reset ocx synchronization/trigger event syncsel<4:0> trigger (1) note 1: the trigger/sync source is enabled by default and is set to timer2 as a source. this timer must be enabled for proper ocx module operation or the trigger/sync source must be changed to another source option. ctmu edge control logic ocx output and fault logic downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 194 ? 2013-2015 microchip technology inc. 16.1 output compare control registers register 16-1: ocxcon1: output compare x control register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 ocsidl octsel2 octsel1 octsel0 bit 15 bit 8 r/w-0 u-0 u-0 r/w-0, hsc r/w-0 r/w-0 r/w-0 r/w-0 enflta ocflta trigmode ocm2 ocm1 ocm0 bit 7 bit 0 legend: hsc = hardware settable/clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 ocsidl: output compare x stop in idle mode control bit 1 = output compare x halts in cpu idle mode 0 = output compare x continues to operate in cpu idle mode bit 12-10 octsel<2:0>: output compare x clock select bits 111 = peripheral clock (f p ) 110 = reserved 101 = reserved 100 = t1clk is the clock source of the ocx (only the synchronous clock is supported) 011 = t5clk is the clock source of the ocx 010 = t4clk is the clock source of the ocx 001 = t3clk is the clock source of the ocx 000 = t2clk is the clock source of the ocx bit 9-8 unimplemented: read as 0 bit 7 enflta: output compare x fault a input enable bit 1 = output compare fault a (ocfa) input is enabled 0 = output compare fault a (ocfa) input is disabled bit 6-5 unimplemented: read as 0 bit 4 ocflta: pwm fault a condition status bit 1 = pwm fault a condition on the ocfa pin has occurred 0 = pwm fault a condition on the ocfa pin has not occurred bit 3 trigmode: trigger status mode select bit 1 = trigstat (ocxcon2<6>) is cleared when ocxrs = ocxtmr or in software 0 = trigstat is cleared only by software note 1: ocxr and ocxrs are double-buffered in pwm mode only. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 195 dspic33evxxxgm00x/10x family bit 2-0 ocm<2:0>: output compare x mode select bits 111 = center-aligned pwm mode: output sets high when ocxtmr = ocxr and sets low when ocxtmr = ocxrs ( 1 ) 110 = edge-aligned pwm mode: output sets high when ocxtmr = 0 and sets low when ocxtmr = ocxr ( 1 ) 101 = double compare continuous pulse mode: initializes ocx pin low, toggles ocx state continuously on alternate matches of ocxr and ocxrs 100 = double compare single-shot mode: initializes ocx pin low, toggles ocx state on matches of ocxr and ocxrs for one cycle 011 = single compare mode: compare event with ocxr, continuously toggles ocx pin 010 = single compare single-shot mode: initializes ocx pin high, compare event with ocxr, forc es ocx pin low 001 = single compare single-shot mode: initializes ocx pin low, compare event with ocxr, forces ocx pin high 000 = output compare channel is disabled register 16-1: ocxcon1: output compare x control register 1 (continued) note 1: ocxr and ocxrs are double-buffered in pwm mode only. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 196 ? 2013-2015 microchip technology inc. register 16-2: ocxcon2: output compare x control register 2 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 r/w-0 fltmd fltout flttrien ocinv o c 3 2 bit 15 bit 8 r/w-0 r/w-0, hs r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 octrig trigstat octris syncsel4 syncsel3 syncsel2 syncsel1 syncsel0 bit 7 bit 0 legend: hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 fltmd: fault mode select bit 1 = fault mode is maintained until the fault source is removed; the ocflta bit is cleared in software and a new pwm period starts 0 = fault mode is maintained until the fault source is removed and a new pwm period starts bit 14 fltout: fault out bit 1 = pwm output is driven high on a fault 0 = pwm output is driven low on a fault bit 13 flttrien: fault output state select bit 1 = ocx pin is tri-stated on a fault condition 0 = ocx pin i/o state is defined by the fltout bit on a fault condition bit 12 ocinv: output compare x invert bit 1 = ocx output is inverted 0 = ocx output is not inverted bit 11-9 unimplemented: read as 0 bit 8 oc32: cascade two ocx modules enable bit (32-bit operation) 1 = cascade module operation is enabled 0 = cascade module operation is disabled bit 7 octrig: output compare x trigger/sync select bit 1 = triggers ocx from the source designated by the syncselx bits 0 = synchronizes ocx with the source designated by the syncselx bits bit 6 trigstat: timer trigger status bit 1 = timer source has been triggered and is running 0 = timer source has not been triggered and is being held clear bit 5 octris: output compare x output pin direction select bit 1 = output compare x is tri-stated 0 = output compare x module drives the ocx pin note 1: do not use the ocx module as its own synchronization or trigger source. 2: when the ocy module is turned off, it sends a trigger out signal. if the ocx module uses the ocy module as a trigger source, the ocy module must be unsele cted as a trigger source prior to disabling it. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 197 dspic33evxxxgm00x/10x family bit 4-0 syncsel<4:0>: trigger/synchronization source selection bits 11111 = ocxrs compare event is used for synchronization 11110 = int2 is the source for compare timer synchronization 11101 = int1 is the source for compare timer synchronization 11100 = ctmu trigger is the source for compare timer synchronization 11011 = adc1 interrupt is the source for compare timer synchronization 11010 = analog comparator 3 is the source for compare timer synchronization 11001 = analog comparator 2 is the source for compare timer synchronization 11000 = analog comparator 1 is the source for compare timer synchronization 10111 = analog comparator 5 is the source for compare timer synchronization 10110 = analog comparator 4 is the source for compare timer synchronization 10101 = capture timer is unsynchronized 10100 = capture timer is unsynchronized 10011 = input capture 4 interrupt is the source for compare timer synchronization 10010 = input capture 3 interrupt is the source for compare timer synchronization 10001 = input capture 2 interrupt is the source for compare timer synchronization 10000 = input capture 1 interrupt is the source for compare timer synchronization 01111 = gp timer5 is the source for compare timer synchronization 01110 = gp timer4 is the source for compare timer synchronization 01101 = gp timer3 is the source for compare timer synchronization 01100 = gp timer2 is the source for compare timer synchronization 01011 = gp timer1 is the source for compare timer synchronization 01010 = compare timer is unsynchronized 01001 = compare timer is unsynchronized 01000 = capture timer is unsynchronized 00101 = compare timer is unsynchronized 00100 = output compare 4 is the source for compare timer synchronization ( 1 , 2 ) 00011 = output compare 3 is the source for compare timer synchronization ( 1 , 2 ) 00010 = output compare 2 is the source for compare timer synchronization ( 1 , 2 ) 00001 = output compare 1 is the source for compare timer synchronization ( 1 , 2 ) 00000 = compare timer is unsynchronized register 16-2: ocxcon2: output comp are x control register 2 (continued) note 1: do not use the ocx module as its own synchronization or trigger source. 2: when the ocy module is turned off, it sends a trigger out signal. if the ocx module uses the ocy module as a trigger source, the ocy module must be unsele cted as a trigger source prior to disabling it. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 198 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 199 dspic33evxxxgm00x/10x family 17.0 high-speed pwm module the dspic33evxxxgm00x/10x family devices support a dedicated pulse-width modulation (pwm) module with up to 6 outputs. the high-speed pwmx module consists of the following major features: three pwm generators two pwm outputs per pwm generator individual period and duty cycle for each pwm pair duty cycle, dead time, phase shift and frequency resolution of 8.32 ns independent fault and current-limit inputs for six pwm outputs redundant output center-aligned pwm mode output override control chop mode (also known as gated mode) special event trigger prescaler for input clock pwmxl and pwmxh output pin swapping independent pwm frequency, duty cycle and phase-shift changes for each pwm generator dead-time compensation enhanced leading-edge blanking (leb) functionality frequency resolution enhancement pwm capture functionality the high-speed pwmx module contains up to three pwm generators. each pwm generator provides two pwm outputs: pwmxh and pwmxl . the master time base generator provides a synchronous signal as a common time base to synchronize the various pwm outputs. the individual pwm outputs are available on the output pins of the device. the input fault signals and current-limit signals, when enabled, can monitor and protect the system by placing the pwm outputs into a known safe state. each pwmx can generate a trigger to the adc module to sample the analog signal at a specific instance during the pwm period. in addition, the high-speed pwmx module also generates a special event trigger to the adc module based on the master time base. the high-speed pwmx module can synchronize itself with an external signal or can act as a synchronizing source to any external device. the synci1 input pin, that utilizes pps, can synchronize the high-speed pwmx module with an external signal. the synco1 pin is an output pin that provides a synchronous signal to an external device. figure 17-1 illustrates an architectural overview of the high-speed pwmx module and its interconnection with the cpu and other peripherals. 17.1 pwm faults the pwmx module incorporates multiple external fault inputs as follows: flt1 and flt2, available on 28-pin, 44-pin and 64-pin packages, which are remappable using the pps feature flt3, available on 44-pin and 64-pin packages, which is available as a fixed pin flt4-flt8, available on 64-pin packages, which are available as fixed pins flt32 is available on a fixed pin on all devices these faults provide a safe and reliable way to safely shut down the pwm outputs when the fault input is asserted. 17.1.1 pwm faults at reset during any reset event, the pwmx module maintains ownership of the class b fault, flt32. at reset, this fault is enabled in latched mode to ensure the fail-safe power-up of the application. the application software must clear the pwm fault before enabling the high- speed motor control pwmx module. to clear the fault condition, the flt32 pin must first be pulled low externally or the internal pull-down resistor in the cnpdx register can be enabled . note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to high-speed pwm (ds70645) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: in edge-aligned pwm mode, the duty cycle, dead time, phase shift and frequency resolution are 8.32 ns at 60 mips. note: the fault mode may be changed using the fltmod<1:0> bits (fclconx<1:0>), regardless of the state of flt32. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 200 ? 2013-2015 microchip technology inc. 17.1.2 write-protected registers on dspic33evxxxgm00x/10x family devices, write protection is implemented for the ioconx and fclconx registers. the write protection feature prevents any inadvertent writes to these registers. this protection feature can be controlled by the pwmlock configuration bit (fdevopt<0>). the default state of the write protection feature is enabled (pwmlock = 1 ). the write protection feature can be disabled by configuring pwmlock = 0 . to gain write access to these locked registers, the user application must write two consecutive values (0xabcd and 0x4321) to the pwmkey register to perform the unlock operation. the write access to the ioconx or fclconx registers must be the next sfr access following the unlock process. there can be no other sfr accesses during the unlock process and subsequent write access. to write to both the ioconx and fclconx registers requires two unlock operations. the correct unlocking sequence is described in example 17-1 . example 17-1: pwm1 write-protec ted register unlock sequence ; flt32 pin must be pulled low externally in order to clear and disable the fault ; writing to fclcon1 register requires unlock sequence mov #0xabcd, w10 ; load first unlock key to w10 register mov #0x4321, w11 ; load second unlock key to w11 register mov #0x0000, w0 ; load desired value of fclcon1 register in w0 mov w10, pwmkey ; write first unlock key to pwmkey register mov w11, pwmkey ; write second unlock key to pwmkey register mov w0, fclcon1 ; write desired value to fclcon1 register ; set pwm ownership and polarity using the iocon1 register ; writing to iocon1 register requires unlock sequence mov #0xabcd, w10 ; load first unlock key to w10 register mov #0x4321, w11 ; load second unlock key to w11 register mov #0xf000, w0 ; load desired value of iocon1 register in w0 mov w10, pwmkey ; write first unlock key to pwmkey register mov w11, pwmkey ; write second unlock key to pwmkey register mov w0, iocon1 ; write desired value to iocon1 register downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 201 dspic33evxxxgm00x/10x family figure 17-1: high-speed pwmx module architectural overview cpu pwm generator 3 synci1 synco1 pwm1h pwm1l pwm1 interrupt (1) pwm2h pwm2l pwm2 interrupt (1) pwm3h pwm3l pwm3 interrupt (1) synchronization signal data bus adc module flt1-flt8, flt32 synchronization signal synchronization signal primary trigger primary special dtcmp1-dtcmp3 fault, current-limit and dead-time compensation event trigger master time base fault, current-limit and dead-time compensation fault, current-limit and dead-time compensation f osc note 1: the pwm interrupts are generated by logically oring the fltstat, clstat and trgstat status bits for t he given pwm generator. for more information, refer to high-speed pwm (ds70645) in the dspic33/pic24 family reference manual . pwm generator 2 pwm generator 1 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 202 ? 2013-2015 microchip technology inc. figure 17-2: high-speed pwmx modul e register interconnection diagram mux ptmrx pdcx pwmconx, ptcon, ptcon2 ioconx dtrx pwmxl pwmxh fltx pwm1l pwm1h fclconx phasex lebconx, altdtrx user override logic current-limit pwm output mode control logic logic pin control logic fault and current-limit logic pwm generator 1 fltx pwm generator 2 and pwm generator 3 interrupt logic (1) module control and timing master duty cycle register synchronization synchronization master period master period master duty cycle master duty cycle synci1 synco1 sevtcmp comparator special event trigger special event postscaler ptper pmtmr primary master time base master time base counter special event compare trigger comparator clock prescaler comparator dead-time fault override logic override logic dtcmpx dtcmp1 f osc pwmkey ioconx and fclconx unlock register auxconx lebdlyx trgconx adc trigger comparator trigx note 1: the pwm interrupts are generated by logically oring the fltstat, clstat and trgstat status bits for the given pwm generator. for more information, refer to, high-speed pwm (ds70645) in the dspic33/pic24 family reference manual . mdc 16-bit data bus downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 203 dspic33evxxxgm00x/10x family 17.2 pwm resources many useful resources are provided on the main product page on the microchip web site ( www.microchip.com ) for the devices listed in this data sheet. this product page contains the latest updates and additional information. 17.2.1 key resources high-speed pwm (ds70645) in the dspic33/ pic24 family reference manual code samples application notes software libraries webinars all related dspic33/pic24 family reference manual sections development tools note: in case the above link is not accessible, enter this url in your browser: http://www.microchip.com/wwwproducts/ devices.aspx?ddocname=en555464 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 204 ? 2013-2015 microchip technology inc. 17.3 pwmx control registers register 17-1: ptcon: pwmx time base control register r/w-0 u-0 r/w-0 hs-0, hc r/w-0 r/w-0 r/w-0 r/w-0 pten ptsidl sestat seien eipu ( 1 ) syncpol ( 1 ) syncoen ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 syncen ( 1 ) syncsrc2 ( 1 ) syncsrc1 ( 1 ) syncsrc0 ( 1 ) sevtps3 ( 1 ) sevtps2 ( 1 ) sevtps1 ( 1 ) sevtps0 ( 1 ) bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 pten: pwmx module enable bit 1 = pwmx module is enabled 0 = pwmx module is disabled bit 14 unimplemented: read as 0 bit 13 ptsidl: pwmx time base stop in idle mode bit 1 = pwmx time base halts in cpu idle mode 0 = pwmx time base runs in cpu idle mode bit 12 sestat: special event interrupt status bit 1 = special event interrupt is pending 0 = special event interrupt is not pending bit 11 seien: special event interrupt enable bit 1 = special event interrupt is enabled 0 = special event interrupt is disabled bit 10 eipu: enable immediate period updates bit ( 1 ) 1 = active period register is updated immediately 0 = active period register updates occur on pwmx cycle boundaries bit 9 syncpol: synchronize input and output polarity bit ( 1 ) 1 = synci1/synco1 polarity is inverted (active-low) 0 = synci1/synco1 is active-high bit 8 syncoen: primary time base sync enable bit ( 1 ) 1 = synco1 output is enabled 0 = synco1 output is disabled bit 7 syncen: external time base synchronization enable bit ( 1 ) 1 = external synchronization of primary time base is enabled 0 = external synchronization of primary time base is disabled note 1: these bits should be changed only when pten = 0 . in addition, when using the synci1 feature, the user application must program the period register with a value that is slightly larger than the expected period of the external synchronization input signal. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 205 dspic33evxxxgm00x/10x family bit 6-4 syncsrc<2:0>: synchronous source selection bits ( 1 ) 111 = reserved 100 = reserved 011 = reserved 010 = reserved 001 = reserved 000 = synci1 input from pps bit 3-0 sevtps<3:0>: special event trigger output postscaler select bits ( 1 ) 1111 = 1:16 postscaler generates a special event trigger on every sixteenth compare match event 0001 = 1:2 postscaler generates a special event trigger on every second compare match event 0000 = 1:1 postscaler generates a special event trigger on every compare match event register 17-1: ptcon: pwmx time base control register (continued) note 1: these bits should be changed only when pten = 0 . in addition, when using the synci1 feature, the user application must program the period register with a value that is slightly larger than the expected period of the external synchronization input signal. register 17-2: ptcon2: pwmx primary ma ster clock divider select register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 p c l k d i v < 2 : 0 > ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-3 unimplemented: read as 0 bit 2-0 pclkdiv<2:0>: pwmx input clock prescaler (divider) select bits ( 1 ) 111 = reserved 110 = divide-by-64 101 = divide-by-32 100 = divide-by-16 011 = divide-by-8 010 = divide-by-4 001 = divide-by-2 000 = divide-by-1, maximum pwmx timing resolution (power-on default) note 1: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 206 ? 2013-2015 microchip technology inc. register 17-3: ptper: pwmx primary master time base period register r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 ptper<15:8> bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 ptper<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 ptper<15:0>: primary master time base (pmtmr) period value bits register 17-4: sevtcmp: pwmx prim ary special event compare register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sevtcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sevtcmp<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 sevtcmp<15:0>: special event compare count value bits downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 207 dspic33evxxxgm00x/10x family register 17-5: chop: pwmx ch op clock generator register r/w-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 chpclken chopclk9 chopclk8 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 chopclk7 chopclk6 chopclk5 chopclk4 c hopclk3 chopclk2 chopclk1 chopclk0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 chpclken: enable chop clock generator bit 1 = chop clock generator is enabled 0 = chop clock generator is disabled bit 14-10 unimplemented: read as 0 bit 9-0 chopclk<9:0>: chop clock divider bits the frequency of the chop clock signal is given by the following expression: chop frequency = (f p /pclkdiv<2:0>)/(chopclk<9:0> + 1) register 17-6: mdc: pwmx master duty cycle register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 mdc<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 mdc<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 mdc<15:0>: pwmx master duty cycle value bits downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 208 ? 2013-2015 microchip technology inc. register 17-7: pwmconx: pwmx control register hs-0, hc hs-0, hc hs-0, hc r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 fltstat ( 1 ) clstat ( 1 ) trgstat fltien clien trgien itb ( 2 ) mdcs ( 2 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 dtc1 dtc0 dtcp ( 3 ) c a m ( 2 , 4 ) xpres ( 5 ) iue ( 2 ) bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 fltstat: fault interrupt status bit ( 1 ) 1 = fault interrupt is pending 0 = fault interrupt is not pending this bit is cleared by setting fltien = 0 . bit 14 clstat: current-limit interrupt status bit ( 1 ) 1 = current-limit interrupt is pending 0 = current-limit interrupt is not pending this bit is cleared by setting clien = 0 . bit 13 trgstat: trigger interrupt status bit 1 = trigger interrupt is pending 0 = trigger interrupt is not pending this bit is cleared by setting trgien = 0 . bit 12 fltien: fault interrupt enable bit 1 = fault interrupt is enabled 0 = fault interrupt is disabled and the fltstat bit is cleared bit 11 clien: current-limit interrupt enable bit 1 = current-limit interrupt is enabled 0 = current-limit interrupt is disabled and the clstat bit is cleared bit 10 trgien: trigger interrupt enable bit 1 = trigger event generates an interrupt request 0 = trigger event interrupts are disabled and the trgstat bit is cleared bit 9 itb: independent time base mode bit ( 2 ) 1 = phasex register provides time base period for this pwm generator 0 = ptper register provides timing for this pwm generator bit 8 mdcs: master duty cycle register select bit ( 2 ) 1 = mdc register provides duty cycle information for this pwm generator 0 = pdcx register provides duty cycle information for this pwm generator note 1: software must clear the interrupt status here and in the corresponding ifsx bit in the interrupt controller. 2: these bits should not be changed after the pwmx is enabled (pten = 1 ). 3: dtc<1:0> = 11 for dtcp to be effective; else, dtcp is ignored. 4: the independent time base (itb = 1 ) mode must be enabled to use center-aligned mode. if itb = 0 , the cam bit is ignored. 5: to operate in external period reset mode, the itb bit must be 1 and the clmod bit in the fclconx register must be 0 . downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 209 dspic33evxxxgm00x/10x family bit 7-6 dtc<1:0>: dead-time control bits 11 = dead-time compensation mode 10 = dead-time function is disabled 01 = negative dead time is actively applied for complementary output mode 00 = positive dead time is actively applied for all output modes bit 5 dtcp: dead-time compensation polarity bit ( 3 ) when set to 1 : if dtcmpx = 0 , pwmxl is shortened and pwmxh is lengthened. if dtcmpx = 1 , pwmxh is shortened and pwmxl is lengthened. when set to 0 : if dtcmpx = 0 , pwmxh is shortened and pwmxl is lengthened. if dtcmpx = 1 , pwmxl is shortened and pwmxh is lengthened. bit 4-3 unimplemented: read as 0 bit 2 cam: center-aligned mode enable bit ( 2 , 4 ) 1 = center-aligned mode is enabled 0 = edge-aligned mode is enabled bit 1 xpres: external pwmx reset control bit ( 5 ) 1 = current-limit source resets the time base for this pwm generator if it is in independent time base mode 0 = external pins do not affect pwmx time base bit 0 iue: immediate update enable bit ( 2 ) 1 = updates to the active mdc/pdcx/dtrx/altdtrx/phasex registers are immediate 0 = updates to the active mdc/pdcx/dtrx/altdtrx/phasex registers are synchronized to the pwmx period boundary register 17-7: pwmconx: pwmx control register (continued) note 1: software must clear the interrupt status here and in the corresponding ifsx bit in the interrupt controller. 2: these bits should not be changed after the pwmx is enabled (pten = 1 ). 3: dtc<1:0> = 11 for dtcp to be effective; else, dtcp is ignored. 4: the independent time base (itb = 1 ) mode must be enabled to use center-aligned mode. if itb = 0 , the cam bit is ignored. 5: to operate in external period reset mode, the itb bit must be 1 and the clmod bit in the fclconx register must be 0 . downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 210 ? 2013-2015 microchip technology inc. register 17-8: pdcx: pwmx generator duty cycle register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pdcx<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pdcx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 pdcx<15:0>: pwmx generator duty cycle value bits register 17-9: phasex: pwmx primary phase-shift register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 phasex<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 phasex<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 phasex<15:0>: pwmx phase-shift value or independent time base period for the pwm generator bits note 1: if itb (pwmconx<9>) = 0 , the following applies based on the mode of operation: complementary, redundant and push-pull output modes (pmod<1:0> (ioconx<11:10>) = 00 , 01 or 10 ), phasex<15:0> = phase-shift value for pwmxh and pwmxl outputs. 2: if itb (pwmconx<9>) = 1 , the following applies based on the mode of operation: complementary, redundant and push-pull output modes (pmod<1:0> (ioconx<11:10>) = 00 , 01 or 10 ), phasex<15:0> = independent time base period value for pwmxh and pwmxl. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 211 dspic33evxxxgm00x/10x family register 17-10: dtrx: pwmx dead-time register u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 d t r x < 1 3 : 8 > bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dtrx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-0 dtrx<13:0>: unsigned 14-bit dead-time value for pwmx dead-time unit bits register 17-11: altdtrx: pwmx alternate dead-time register u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 altdtrx<13:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 altdtrx<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-0 altdtrx<13:0>: unsigned 14-bit alternate dead-time value for pwmx dead-time unit bits downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 212 ? 2013-2015 microchip technology inc. register 17-12: trgconx: pwmx trigger control register r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 trgdiv3 trgdiv2 trgdiv1 trgdiv0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 t r g s t r t 5 ( 1 ) trgstrt4 ( 1 ) trgstrt3 ( 1 ) trgstrt2 ( 1 ) trgstrt1 ( 1 ) trgstrt0 ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 trgdiv<3:0>: trigger output divider bits 1111 = triggers output for every 16th trigger event 1110 = triggers output for every 15th trigger event 1101 = triggers output for every 14th trigger event 1100 = triggers output for every 13th trigger event 1011 = triggers output for every 12th trigger event 1010 = triggers output for every 11th trigger event 1001 = triggers output for every 10th trigger event 1000 = triggers output for every 9th trigger event 0111 = triggers output for every 8th trigger event 0110 = triggers output for every 7th trigger event 0101 = triggers output for every 6th trigger event 0100 = triggers output for every 5th trigger event 0011 = triggers output for every 4th trigger event 0010 = triggers output for every 3rd trigger event 0001 = triggers output for every 2nd trigger event 0000 = triggers output for every trigger event bit 11-6 unimplemented: read as 0 bit 5-0 trgstrt<5:0>: trigger postscaler start enable select bits ( 1 ) 111111 = waits 63 pwm cycles before generating the first trigger event after the module is enabled 000010 = waits 2 pwm cycles before generating the first trigger event after the module is enabled 000001 = waits 1 pwm cycle before generating the first trigger event after the module is enabled 000000 = waits 0 pwm cycles before generating the first trigger event after the module is enabled note 1: the secondary pwm generator cannot generate pwmx trigger interrupts. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 213 dspic33evxxxgm00x/10x family register 17-13: ioconx: pw mx i/o control register ( 2 ) r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 penh penl polh poll pmod1 ( 1 ) pmod0 ( 1 ) ovrenh ovrenl bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ovrdat1 ovrdat0 fltdat1 fltdat0 cldat1 cldat0 swap osync bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 penh: pwmxh output pin ownership bit 1 = pwmx module controls the pwmxh pin 0 = gpio module controls the pwmxh pin bit 14 penl: pwmxl output pin ownership bit 1 = pwmx module controls the pwmxl pin 0 = gpio module controls the pwmxl pin bit 13 polh: pwmxh output pin polarity bit 1 = pwmxh pin is active-low 0 = pwmxh pin is active-high bit 12 poll: pwmxl output pin polarity bit 1 = pwmxl pin is active-low 0 = pwmxl pin is active-high bit 11-10 pmod<1:0>: pwmx i/o pin mode bits ( 1 ) 11 = reserved; do not use 10 = pwmx i/o pin pair is in the push-pull output mode 01 = pwmx i/o pin pair is in the redundant output mode 00 = pwmx i/o pin pair is in the complementary output mode bit 9 ovrenh: override enable for pwmxh pin bit 1 = ovrdat1 controls the output on the pwmxh pin 0 = pwmx generator controls the pwmxh pin bit 8 ovrenl: override enable for pwmxl pin bit 1 = ovrdat0 controls the output on the pwmxl pin 0 = pwmx generator controls the pwmxl pin bit 7-6 ovrdat<1:0>: data for pwmxh, pwmxl pins if override is enabled bits if overenh = 1 , pwmxh is driven to the state specified by ovrdat1. if overenl = 1 , pwmxl is driven to the state specified by ovrdat0. bit 5-4 fltdat<1:0>: data for pwmxh and pwmxl pins if fltmod is enabled bits if fault is active, pwmxh is driven to the state specified by fltdat1. if fault is active, pwmxl is driven to the state specified by fltdat0. bit 3-2 cldat<1:0>: data for pwmxh and pwmxl pins if clmod is enabled bits if current limit is active, pwmxh is driven to the state specified by cldat1. if current limit is active, pwmxl is driven to the state specified by cldat0. note 1: these bits should not be changed after the pwmx module is enabled (pten = 1 ). 2: if the pwmlock configuration bit (fdevopt<0>) is a 1 , the ioconx register can only be written after the unlock sequence has been executed. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 214 ? 2013-2015 microchip technology inc. bit 1 swap: swap pwmxh and pwmxl pins bit 1 = pwmxh output signal is connected to the pwmxl pin; pwmxl output signal is connected to the pwmxh pin 0 = pwmxh and pwmxl pins are mapped to their respective pins bit 0 osync: output override synchronization bit 1 = output overrides through the ovrdat<1:0> bits are synchronized to the pwmx time base 0 = output overrides through the ovrdat<1:0> bits occur on the next cpu clock boundary register 17-13: ioconx: pw mx i/o control register ( 2 ) (continued) note 1: these bits should not be changed after the pwmx module is enabled (pten = 1 ). 2: if the pwmlock configuration bit (fdevopt<0>) is a 1 , the ioconx register can only be written after the unlock sequence has been executed. register 17-14: trigx: pwmx primary trigger compare value register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 trgcmp<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 trgcmp<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 trgcmp<15:0>: trigger control value bits when the primary pwmx functions in the local time base, this register contains the compare values that can trigger the adc module. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 215 dspic33evxxxgm00x/10x family register 17-15: fclconx: pwmx fault current-limit control register ( 1 ) u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 clsrc4 clsrc3 clsrc2 clsrc1 clsrc0 clpol ( 2 ) clmod bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 fltsrc4 fltsrc3 fltsrc2 fltsrc1 fltsrc0 fltpol ( 2 ) fltmod1 fltmod0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14-10 clsrc<4:0>: current-limit control signal source select for pwm generator x bits 11111 = fault 32 11110 = reserved 01100 = op amp/comparator 5 01011 = comparator 4 01010 = op amp/comparator 3 01001 = op amp/comparator 2 01000 = op amp/comparator 1 00111 = fault 8 00110 = fault 7 00101 = fault 6 00100 = fault 5 00011 = fault 4 00010 = fault 3 00001 = fault 2 00000 = fault 1 (default) bit 9 clpol: current-limit polarity for pwm generator x bit ( 2 ) 1 = the selected current-limit source is active-low 0 = the selected current-limit source is active-high bit 8 clmod: current-limit mode enable for pwm generator x bit 1 = current-limit mode is enabled 0 = current-limit mode is disabled note 1: if the pwmlock configuration bit (fdevopt<0>) is a 1 , the fclconx register can only be written after the unlock sequence has been executed. 2: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 216 ? 2013-2015 microchip technology inc. bit 7-3 fltsrc<4:0>: fault control signal source select for pwm generator x bits 11111 = fault 32 (default) 11110 = reserved 01100 = op amp/comparator 5 01011 = comparator 4 01010 = op amp/comparator 3 01001 = op amp/comparator 2 01000 = op amp/comparator 1 00111 = fault 8 00110 = fault 7 00101 = fault 6 00100 = fault 5 00011 = fault 4 00010 = fault 3 00001 = fault 2 00000 = fault 1 bit 2 fltpol: fault polarity for pwm generator x bit ( 2 ) 1 = the selected fault source is active-low 0 = the selected fault source is active-high bit 1-0 fltmod<1:0>: fault mode for pwm generator x bits 11 = fault input is disabled 10 = reserved 01 = the selected fault source forces the pwmxh, pwmxl pins to fltdat<1:0> values (cycle) 00 = the selected fault source forces the pwmxh, pw mxl pins to fltdat<1:0> values (latched condition) register 17-15: fclconx: pwmx fault current-limit control register ( 1 ) (continued) note 1: if the pwmlock configuration bit (fdevopt<0>) is a 1 , the fclconx register can only be written after the unlock sequence has been executed. 2: these bits should be changed only when pten = 0 . changing the clock selection during operation will yield unpredictable results. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 217 dspic33evxxxgm00x/10x family register 17-16: lebconx: pwmx leadi ng-edge blanking control register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 phr phf plr plf fltleben clleben bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 b c h ( 1 ) bcl ( 1 ) bphh bphl bplh bpll bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 phr: pwmxh rising edge trigger enable bit 1 = rising edge of pwmxh will trigger the leading-edge blanking counter 0 = leading-edge blanking ignores the rising edge of pwmxh bit 14 phf: pwmxh falling edge trigger enable bit 1 = falling edge of pwmxh will trigger the leading-edge blanking counter 0 = leading-edge blanking ignores the falling edge of pwmxh bit 13 plr: pwmxl rising edge trigger enable bit 1 = rising edge of pwmxl will trigger the leading-edge blanking counter 0 = leading-edge blanking ignores the rising edge of pwmxl bit 12 plf: pwmxl falling edge trigger enable bit 1 = falling edge of pwmxl will trigger the leading-edge blanking counter 0 = leading-edge blanking ignores the falling edge of pwmxl bit 11 fltleben: fault input leading-edge blanking enable bit 1 = leading-edge blanking is applied to the selected fault input 0 = leading-edge blanking is not applied to the selected fault input bit 10 clleben: current-limit input leading-edge blanking enable bit 1 = leading-edge blanking is applied to the selected current-limit input 0 = leading-edge blanking is not applied to the selected current-limit input bit 9-6 unimplemented: read as 0 bit 5 bch: blanking in selected blanking signal high enable bit ( 1 ) 1 = state blanking (of current-limit and/or fault input signals) when selected blanking signal is high 0 = no blanking when the selected blanking signal is high bit 4 bcl: blanking in selected blanking signal low enable bit ( 1 ) 1 = state blanking (of current-limit and/or fault input signals) when selected blanking signal is low 0 = no blanking when the selected blanking signal is low bit 3 bphh: blanking in pwmxh high enable bit 1 = state blanking (of current-limit and/or fault input signals) when the pwmxh output is high 0 = no blanking when the pwmxh output is high bit 2 bphl: blanking in pwmxh low enable bit 1 = state blanking (of current-limit and/or fault input signals) when the pwmxh output is low 0 = no blanking when the pwmxh output is low bit 1 bplh: blanking in pwmxl high enable bit 1 = state blanking (of current-limit and/or fault input signals) when the pwmxl output is high 0 = no blanking when the pwmxl output is high bit 0 bpll: blanking in pwmxl low enable bit 1 = state blanking (of current-limit and/or fault input signals) when the pwmxl output is low 0 = no blanking when the pwmxl output is low note 1: the blanking signal is selected through the blanksel<3:0> bits in the auxconx register. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 218 ? 2013-2015 microchip technology inc. register 17-17: lebdlyx: pwmx leadi ng-edge blanking delay register u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 leb<11:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 leb<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-0 leb<11:0>: leading-edge blanking delay for current-limit and fault inputs bits downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 219 dspic33evxxxgm00x/10x family register 17-18: auxconx: pwmx auxiliary control register u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 blanksel3 blanksel2 blanksel1 blanksel0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 chopsel3 chopsel2 chopsel1 chopsel0 chophen choplen bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-8 blanksel<3:0>: pwmx state blank source select bits the selected state blank signal will block the current-limit and/or fault input signals (if enabled through the bch and bcl bits in the lebconx register). 1001 = reserved 0100 = reserved 0011 = pwm3h is selected as the state blank source 0010 = pwm2h is selected as the state blank source 0001 = pwm1h is selected as the state blank source 0000 = no state blanking bit 7-6 unimplemented: read as 0 bit 5-2 chopsel<3:0>: pwmx chop clock source select bits the selected signal will enable and disable (chop) the selected pwmx outputs. 1001 = reserved 0100 = reserved 0011 = pwm3h is selected as the chop clock source 0010 = pwm2h is selected as the chop clock source 0001 = pwm1h is selected as the chop clock source 0000 = chop clock generator is selected as the chop clock source bit 1 chophen: pwmxh output chopping enable bit 1 = pwmxh chopping function is enabled 0 = pwmxh chopping function is disabled bit 0 choplen: pwmxl output chopping enable bit 1 = pwmxl chopping function is enabled 0 = pwmxl chopping function is disabled downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 220 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 221 dspic33evxxxgm00x/10x family 18.0 serial peripheral interface (spi) the serial peripheral interface (spi) module is a synchronous serial interface, useful for communicating with other peripheral or microcontroller devices. these peripheral devices can be serial eeproms, shift reg- isters, display drivers, adc converters, etc. the spi module is compatible with the motorola ? spi and siop interfaces. the dspic33evxxxgm00x/10x device family offers two spi modules on a single device, spi1 and spi2, that are functionally identical. each spi module includes an eight-word fifo buffer and allows dma bus connections. when using the spi module with dma, fifo operation can be disabled. the spi1 module uses dedicated pins which allow for a higher speed when using spi1. the spi2 module takes advantage of the peripheral pin select (pps) feature to allow for greater flexibility in pin configuration of this module, but results in a lower maximum speed. see section 30.0 electrical characteristics for more information. the spix serial interface consists of the following four pins: sdix: serial data input sdox: serial data output sckx: shift clock input or output ssx /fsyncx: active-low slave select or frame synchronization i/o pulse the spix module can be configured to operate with two, three or four pins. in 3-pin mode, ssx is not used. in 2-pin mode, neither sdox nor ssx is used. figure 18-1 illustrates the block diagram of the spix module in standard and enhanced modes. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to serial peripheral interface (spi) (ds70005185) in the dspic33/ pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: in this section, the spi modules are referred to together as spix, or separately as spi1 and spi2. special function registers follow a similar notation. for example, spixcon refers to the control register for the spi1 and spi2 modules. note: all of the 4 pins of the spix serial interface must be configured as digital in the anselx registers. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 222 ? 2013-2015 microchip technology inc. figure 18-1: spix module block diagram internal data bus sdix sdox ssx /fsyncx sckx bit 0 shift control edge select f p primary 1:1/4/16/64 enable prescaler sync control transfer transfer write spixbuf read spixbuf 16 spixcon1<1:0> spixcon1<4:2> master clock note 1: in standard mode, the fifo is only one level deep. clock control spixsr secondary prescaler 1:1 to 1:8 8-level fifo receive buffer (1) 8-level fifo transmit buffer (1) spixbuf downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 223 dspic33evxxxgm00x/10x family 18.1 spi helpful tips 1. in frame mode, if there is a possibility that the master may not be initialized before the slave: a) if frmpol (spixcon2<13>) = 1 , use a pull-down resistor on ssx . b) if frmpol = 0 , use a pull-up resistor on ssx . 2. in non-framed 3-wire mode (i.e., not using ssx from a master): a) if ckp (spixcon1<6>) = 1 , always place a pull-up resistor on ssx . b) if ckp = 0 , always place a pull-down resistor on ssx . 3. frmen (spixcon2<15>) = 1 and ssen (spixcon1<7>) = 1 are exclusive and invalid. in frame mode, sckx is continuous and the frame sync pulse is active on the ssx pin, which indicates the start of a data frame. 4. in master mode only, set the smp bit (spixcon1<9>) to a 1 for the fastest spi data rate possible. the smp bit can only be set at the same time or after the msten bit (spixcon1<5>) is set. to avoid invalid slave read data to the master, the users master software must ensure enough time for slave software to fill its write buffer before the user application initiates a master write/read cycle. it is always advisable to preload the spixbuf transmit register in advance of the next master transaction cycle. spixbuf is transferred to the spix shift register and is empty once the data transmission begins. note: this insures that the first frame transmis- sion after initialization is not shifted or corrupted. note: this will insure that during power-up and initialization, the master/slave will not lose sync due to an errant sckx transition that would cause the slave to accumulate data shift errors, for both transmit and receive, appearing as corrupted data. note: not all third-party devices support frame mode timing. for more information, refer to the spi specifications in section 30.0 electrical characteristics . downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 224 ? 2013-2015 microchip technology inc. 18.2 spi control registers register 18-1: spixstat: spix status and control register r/w-0 u-0 r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 spien spisidl spibec2 spibec1 spibec0 bit 15 bit 8 r/w-0 r/c-0, hs r/w-0 r/w-0 r/w-0 r/w-0 r-0, hs, hc r-0, hs, hc srmpt spirov srxmpt sisel2 sisel1 sisel0 spitbf spirbf bit 7 bit 0 legend: hc = hardware clearable bit hs = hardware settable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared c = clearable bit bit 15 spien: spix enable bit 1 = enables the spix module and configures sckx, sdox, sdix and ssx as serial port pins 0 = disables the spix module bit 14 unimplemented: read as 0 bit 13 spisidl: spix stop in idle mode bit 1 = discontinues the spix module operation when the device enters idle mode 0 = continues the spix module operation in idle mode bit 12-11 unimplemented: read as 0 bit 10-8 spibec<2:0>: spix buffer element count bits (valid in enhanced buffer mode) master mode: number of spix transfers are pending. slave mode: number of spix transfers are unread. bit 7 srmpt: spix shift register (spixsr) empty bit (valid in enhanced buffer mode) 1 = the spix shift register is empty and ready to send or receive the data 0 = the spix shift register is not empty bit 6 spirov: spix receive overflow flag bit 1 = a new byte/word is completely received and discarded; the user application has not read the previous data in the spixbuf register 0 = overflow has not occurred bit 5 srxmpt: spix receive fifo empty bit (valid in enhanced buffer mode) 1 = rx fifo is empty 0 = rx fifo is not empty bit 4-2 sisel<2:0>: spix buffer interrupt mode bits (valid in enhanced buffer mode) 111 = interrupt when the spix transmit buffer is full (spitbf bit is set) 110 = interrupt when the last bit is shifted into spixsr, and as a result, the tx fifo is empty 101 = interrupt when the last bit is shifted out of spixsr and the transmit is complete 100 = interrupt when one data is shifted into spixsr, and as a result, the tx fifo has one open memory location 011 = interrupt when the spix receive buffer is full (spirbf bit is set) 010 = interrupt when the spix receive buffer is 3/4 or more full 001 = interrupt when data is available in the spix receive buffer (srmpt bit is set) 000 = interrupt when the last data in the spix receive buffer is read, and as a result, the buffer is empty (srxmpt bit is set) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 225 dspic33evxxxgm00x/10x family bit 1 spitbf: spix transmit buffer full status bit 1 = transmit has not yet started, the spixtxb bit is full 0 = transmit has started, the spixtxb bit is empty standard buffer mode: automatically set in hardware when the core writes to the spixbuf location, loading spixtxb. automatically cleared in hardware when the spix module transfers data from spixtxb to spixsr. enhanced buffer mode: automatically set in the hardware when the cpu writes to the spixbuf location, loading the last avail- able buffer location. automatically cleared in hardware when a buffer location is available for a cpu write operation. bit 0 spirbf: spix receive buffer full status bit 1 = receive is complete, the spixrxb bit is full 0 = receive is incomplete, the spixrxb bit is empty standard buffer mode: automatically set in the hardware when spix transfers data from spixsr to spixrxb. automatically cleared in hardware when the core reads the spixbuf location, reading spixrxb. enhanced buffer mode: automatically set in hardware when spix transfers data from spixsr to the buffer, filling the last unread buffer location. automatically cleared in hardware when a buffer location is available for a transfer from spixsr. register 18-1: spixstat: spix status and control register (continued) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 226 ? 2013-2015 microchip technology inc. register 18-2: spixcon1: spix control register 1 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 dissck dissdo mode16 smp cke ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ssen ( 2 ) ckp msten spre2 ( 3 ) spre1 ( 3 ) spre0 ( 3 ) ppre1 ( 3 ) ppre0 ( 3 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12 dissck: disable sckx pin bit (spi master modes only) 1 = internal spi clock is disabled, pin functions as i/o 0 = internal spi clock is enabled bit 11 dissdo: disable sdox pin bit 1 = sdox pin is not used by the module; pin functions as i/o 0 = sdox pin is controlled by the module bit 10 mode16: word/byte communication select bit 1 = communication is word-wide (16 bits) 0 = communication is byte-wide (8 bits) bit 9 smp: spix data input sample phase bit master mode: 1 = input data is sampled at the end of data output time 0 = input data is sampled at the middle of data output time slave mode: smp must be cleared when spix is used in slave mode. bit 8 cke: clock edge select bit ( 1 ) 1 = serial output data changes on transition from active clock state to idle clock state (refer to bit 6) 0 = serial output data changes on transition from idle clock state to active clock state (refer to bit 6) bit 7 ssen: slave select enable bit (slave mode) ( 2 ) 1 = ssx pin is used for slave mode 0 = ssx pin is not used by the module; pin is controlled by port function bit 6 ckp: clock polarity select bit 1 = idle state for clock is a high level; active state is a low level 0 = idle state for clock is a low level; active state is a high level bit 5 msten: master mode enable bit 1 = master mode 0 = slave mode note 1: the cke bit is not used in framed spi modes. program this bit to 0 for framed spi modes (frmen = 1 ). 2: this bit must be cleared when frmen = 1 . 3: do not set both primary and secondary prescalers to the value of 1:1. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 227 dspic33evxxxgm00x/10x family bit 4-2 spre<2:0>: secondary prescale bits (master mode) ( 3 ) 111 = secondary prescale 1:1 110 = secondary prescale 2:1 000 = secondary prescale 8:1 bit 1-0 ppre<1:0>: primary prescale bits (master mode) ( 3 ) 11 = primary prescale 1:1 10 = primary prescale 4:1 01 = primary prescale 16:1 00 = primary prescale 64:1 register 18-2: spixcon1: spix control register 1 (continued) note 1: the cke bit is not used in framed spi modes. program this bit to 0 for framed spi modes (frmen = 1 ). 2: this bit must be cleared when frmen = 1 . 3: do not set both primary and secondary prescalers to the value of 1:1. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 228 ? 2013-2015 microchip technology inc. register 18-3: spixcon2: spix control register 2 r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 frmen spifsd frmpol bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 frmdly spiben bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 frmen: framed spix support bit 1 = framed spix support is enabled (ssx pin is used as the frame sync pulse input/output) 0 = framed spix support is disabled bit 14 spifsd: spix frame sync pulse direction control bit 1 = frame sync pulse input (slave) 0 = frame sync pulse output (master) bit 13 frmpol: frame sync pulse polarity bit 1 = frame sync pulse is active-high 0 = frame sync pulse is active-low bit 12-2 unimplemented: read as 0 bit 1 frmdly: frame sync pulse edge select bit 1 = frame sync pulse coincides with the first bit clock 0 = frame sync pulse precedes the first bit clock bit 0 spiben: spix enhanced buffer enable bit 1 = enhanced buffer is enabled 0 = enhanced buffer is disabled (standard mode) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 229 dspic33evxxxgm00x/10x family 19.0 inter-integrated circuit? (i 2 c?) the dspic33evxxxgm00x/10x family of devices contains one inter-integrated circuit (i 2 c) module, i2c1. the i 2 c module provides complete hardware support for both slave and multi-master modes of the i 2 c serial communication standard, with a 16-bit interface. the i 2 c module has the following 2-pin interface: the sclx pin is clock. the sdax pin is data. the i 2 c module offers the following key features: i 2 c interface supporting both master and slave modes of operation i 2 c slave mode supports 7 and 10-bit addressing i 2 c master mode supports 7 and 10-bit addressing i 2 c port allows bidirectional transfers between master and slaves serial clock synchronization for i 2 c port can be used as a handshake mechanism to suspend and resume serial transfer (sclrel control) i 2 c supports multi-master operation, detects bus collision and arbitrates accordingly support for address bit masking up to lower 7 bits i 2 c slave enhancements: - sdax hold time selection of smbus (300 ns or 150 ns) - start/stop bit interrupt enables figure 19-1 shows a block diagram of the i 2 c module. 19.1 i 2 c baud rate generator the baud rate generator (brg) used for i 2 c mode operation is used to set the scl clock frequency for 100 khz, 400 khz and 1 mhz. the brg reload value is contained in the i2cxbrg register. the brg will automatically begin counting on a write to the i2cxtrn register. equation 19-1 and equation 19-2 provide the brg reload formula and f scl frequency, respectively. equation 19-1: brg formula equation 19-2: f scl frequency note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to com- plement the information in this data sheet, refer to inter-integrated circuit? (i 2 c?) (ds70000195) in the dspic33/ pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. where: delay varies from 110 ns to 130 ns. i2cxbrg = 1 f scl f cy 2 C delay (( ) ) xC 2 f scl = f cy /(( i2cxbrg + 2) * 2) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 230 ? 2013-2015 microchip technology inc. figure 19-1: i2cx blo ck diagram (x = 1) internal data bus sclx/asclx sdax/asdax shift match detect start and stop bit detect clock address match clock stretching i2cxtrn lsb shift clock brg down counter reload control f cy start, restart, stop bit generate acknowledge generation collision detect i2cxcon i2cxstat control logic read lsb write read i2cxbrg i2cxrsr write read write read write read write read write read i2cxmsk i2cxrcv i2cxadd downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 231 dspic33evxxxgm00x/10x family 19.2 i 2 c control registers register 19-1: i2cxcon1: i2 cx control register 1 r/w-0 u-0 r/w-0 r/s-1 r/w-0 r/w-0 r/w-0 r/w-0 i2cen i2csidl sclrel ( 1 ) strict a10m disslw smen bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0, hc r/w-0, hc r/w-0, hc r/w-0, hc r/w-0, hc gcen stren ackdt acken rcen pen rsen sen bit 7 bit 0 legend: s = settable bit hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 i2cen: i2cx enable bit (writable from sw only) 1 = enables the i 2 c? module and configures the sdax and sclx pins as serial port pins 0 = disables the i 2 c module and all i 2 c pins are controlled by port functions bit 14 unimplemented: read as 0 bit 13 i2csidl: i2cx stop in idle mode bit 1 = discontinues module operation when the device enters idle mode 0 = continues module operation in idle mode bit 12 sclrel: sclx release control bit (i 2 c slave mode only) ( 1 ) module resets and (i2cen = 0 ) sets sclrel = 1 . if stren = 0 : ( 2 ) 1 = releases clock 0 = forces clock low (clock stretch) if stren = 1 : 1 = releases clock 0 = holds clock low (clock stretch); user may program this bit to 0 , clock stretch at the next sclx low bit 11 strict: strict i 2 c reserved address rule enable bit 1 = strict reserved addressing is enforced in slave mode, the device does not respond to reserved address space and addresses falling in that category are nacked. 0 = reserved addressing would be acknowledged in slave mode, the device will respond to an address falling in the reserved address space. when there is a match with any of the reserved addresses, the device will generate an ack. bit 10 a10m: 10-bit slave address flag bit 1 = i2cxadd is a 10-bit slave address 0 = i2cxadd is a 7-bit slave address bit 9 disslw: slew rate control disable bit 1 = slew rate control is disabled for standard speed mode (100 khz, also disabled for 1 mhz mode) 0 = slew rate control is enabled for high-speed mode (400 khz) bit 8 smen: smbus input levels enable bit 1 = enables the input logic so thresholds are compliant with the smbus specification 0 = disables the smbus-specific inputs note 1: automatically cleared to 0 at the beginning of slave transmission; automatically cleared to 0 at the end of slave reception. 2: automatically cleared to 0 at the beginning of slave transmission. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 232 ? 2013-2015 microchip technology inc. bit 7 gcen: general call enable bit (i 2 c slave mode only) 1 = enables interrupt when a general call address is received in i2cxrsr; module is enabled for reception 0 = general call address is disabled. bit 6 stren: sclx clock stretch enable bit in i 2 c slave mode only, used in conjunction with the sclrel bit. 1 = enables clock stretching 0 = disables clock stretching bit 5 ackdt: acknowledge data bit in i 2 c master mode, during master receive mode. the value that will be transmitted when the user initiates an acknowledge sequence at the end of a receive. in i 2 c slave mode when ahen = 1 or dhen = 1 . the value that the slave will transmit when it initiates an acknowledge sequence at the end of an address or data reception. 1 = nack is sent 0 = ack is sent bit 4 acken: acknowledge sequence enable bit in i 2 c master mode only; applicable during master receive mode. 1 = initiates acknowledge sequence on sdax and sclx pins, and transmits ackdt data bit 0 = acknowledge sequence is idle bit 3 rcen: receive enable bit (i 2 c master mode only) 1 = enables receive mode for i 2 c, automatically cleared by hardware at the end of 8-bit receive data byte 0 = receive sequence is not in progress bit 2 pen: stop condition enable bit (i 2 c master mode only) 1 = initiates stop condition on sdax and sclx pins 0 = stop condition is idle bit 1 rsen: restart condition enable bit (i 2 c master mode only) 1 = initiates restart condition on sdax and sclx pins 0 = restart condition is idle bit 0 sen: start condition enable bit (i 2 c master mode only) 1 = initiates start condition on sdax and sclx pins 0 = start condition is idle register 19-1: i2cxcon1: i2cx co ntrol register 1 (continued) note 1: automatically cleared to 0 at the beginning of slave transmission; automatically cleared to 0 at the end of slave reception. 2: automatically cleared to 0 at the beginning of slave transmission. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 233 dspic33evxxxgm00x/10x family register 19-2: i2cxcon2: i2 cx control register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 pcie scie boen sdaht sbcde ahen dhen bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6 pcie: stop condition interrupt enable bit (i 2 c? slave mode only). 1 = enables interrupt on detection of stop condition 0 = stop detection interrupts are disabled bit 5 scie: start condition interrupt enable bit (i 2 c slave mode only) 1 = enables interrupt on detection of start or restart conditions 0 = start detection interrupts are disabled bit 4 boen: buffer overwrite enable bit (i 2 c slave mode only) 1 = the i2cxrcv register bit is updated and an ack is generated for a received address/data byte, ignoring the state of the i2cov bit only if the rbf bit = 0 0 = the i2cxrcv register bit is only updated when i2cov is clear bit 3 sdaht: sdax hold time selection bit 1 = minimum of 300 ns hold time on sdax after the falling edge of sclx 0 = minimum of 100 ns hold time on sdax after the falling edge of sclx bit 2 sbcde: slave mode bus collision detect enable bit (i 2 c slave mode only) if, on the rising edge of sclx, sdax is sampled low when the module is outputting a high state, the bcl bit is set and the bus goes idle. this detection mode is only valid during data and ack transmit sequences. 1 = slave bus collision interrupts are enabled 0 = slave bus collision interrupts are disabled bit 1 ahen: address hold enable bit (i 2 c slave mode only) 1 = following the 8 th falling edge of sclx for a matching received address byte; the sclrel bit (i2cxcon1<12>) will be cleared and the sclx will be held low 0 = address holding is disabled bit 0 dhen: data hold enable bit (i 2 c slave mode only) 1 = following the 8 th falling edge of sclx for a received data byte; slave hardware clears the sclrel bit (i2cxcon1<12>) and the sclx is held low 0 = data holding is disabled downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 234 ? 2013-2015 microchip technology inc. register 19-3: i2cxstat: i2cx status register r-0, hsc r-0, hsc r-0, hsc u-0 u-0 r/c-0, hsc r-0, hsc r-0, hsc ackstat trstat acktim bcl gcstat add10 bit 15 bit 8 r/c-0, hs r/c-0, hs r-0, hsc r/c-0, hsc r/c-0, hsc r-0, hsc r-0, hsc r-0, hsc iwcol i2cov d_a p s r_w rbf tbf bit 7 bit 0 legend: c = clearable bit hsc = hardware settable/clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared hs = hardware settable bit bit 15 ackstat: acknowledge status bit (updated in all master and slave modes) 1 = acknowledge was not received from slave 0 = acknowledge was received from slave bit 14 trstat: transmit status bit (when operating as i 2 c? master; applicable to master transmit operation) 1 = master transmit is in progress (8 bits + ack ) 0 = master transmit is not in progress bit 13 acktim: acknowledge time status bit (valid in i 2 c slave mode only) 1 = indicates i 2 c bus is in an acknowledge sequence, set on 8 th falling edge of sclx clock 0 = not an acknowledge sequence, cleared on 9 th rising edge of sclx clock bit 12-11 unimplemented: read as 0 bit 10 bcl: bus collision detect bit (master/slave mode; cleared when i 2 c module is disabled, i2cen = 0 ) 1 = a bus collision has been detected during a master or slave transmit operation 0 = bus collision has not been detected bit 9 gcstat: general call status bit (cleared after stop detection) 1 = general call address was received 0 = general call address was not received bit 8 add10: 10-bit address status bit (cleared after stop detection) 1 = 10-bit address was matched 0 = 10-bit address was not matched bit 7 iwcol: write collision detect bit 1 = an attempt to write to the i2cxtrn register failed because the i 2 c module is busy; must be cleared in software 0 = collision has not occurred bit 6 i2cov: i2cx receive overflow flag bit 1 = a byte was received while the i2cxrcv register is still holding the previous byte; i2cov is a dont care in transmit mode, must be cleared in software 0 = overflow has not occurred bit 5 d_a: data/address bit (when operating as i 2 c slave) 1 = indicates that the last byte received was data 0 = indicates that the last byte received or transmitted was an address bit 4 p: i2cx stop bit updated when start, reset or stop is detected; cleared when the i 2 c module is disabled, i2cen = 0 . 1 = indicates that a stop bit has been detected last 0 = indicates that a stop bit was not detected last downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 235 dspic33evxxxgm00x/10x family bit 3 s: i2cx start bit updated when start, reset or stop is detected; cleared when the i 2 c module is disabled, i2cen = 0 . 1 = indicates that a start (or repeated start) bit has been detected last 0 = indicates that a start bit was not detected last bit 2 r_w: read/write information bit (when operating as i 2 c slave) 1 = read: indicates that the data transfer is output from the slave 0 = write: indicates that the data transfer is input to the slave bit 1 rbf: receive buffer full status bit 1 = receive is complete, the i2cxrcv bit is full 0 = receive is not complete, the i2cxrcv bit is empty bit 0 tbf: transmit buffer full status bit 1 = transmit is in progress, i2cxtrn is full (8 bits of data) 0 = transmit is complete, i2cxtrn is empty register 19-4: i2cxmsk: i2cx sl ave mode address mask register u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 msk<9:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 msk<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-10 unimplemented: read as 0 bit 9-0 msk<9:0>: i2cx mask for address bit x select bits 1 = enables masking for bit x of the incoming message address; bit match is not required in this position 0 = disables masking for bit x; bit match is required in this position register 19-3: i2cxstat: i2cx status register (continued) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 236 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 237 dspic33evxxxgm00x/10x family 20.0 single-edge nibble transmission (sent) 20.1 module introduction the single-edge nibble transmission (sent) module is based on the sae j2716, sent C single-edge nibble transmission for automotive applications . the sent protocol is a one-way, single wire time modulated serial communication, based on successive falling edges. it is intended for use in applications where high-resolution sensor data needs to be communicated from a sensor to an engine control unit (ecu). the sentx module has the following major features: selectable transmit or receive mode synchronous or asynchronous transmit modes automatic data rate synchronization optional automatic detection of crc errors in receive mode optional hardware calculation of crc in transmit mode support for optional pause pulse period data buffering for one message frame selectable data length for transmit/receive from 3 to 6 nibbles automatic detection of framing errors sent protocol timing is based on a predetermined time unit, t tick . both the transmitter and receiver must be preconfigured for t tick , which can vary from 3 to 90 ? s. a sent message frame starts with a sync pulse. the purpose of the sync pulse is to allow the receiver to cal- culate the data rate of the message encoded by the transmitter. the sent specification allows messages to be validated with up to a 20% variation in t tick . this allows for the transmitter and receiver to run from differ- ent clocks that may be inaccurate, and drift with time and temperature. the data nibbles are 4 bits in length and are encoded as the data value + 12 ticks. this yields a 0 value of 12 ticks and the maximum value, 0xf, of 27 ticks. a sent message consists of the following: a synchronization/calibration period of 56 tick times a status nibble of 12-27 tick times up to six data nibbles of 12-27 tick times a crc nibble of 12-27 tick times an optional pause pulse period of 12-768 tick times figure 20-1 shows a block diagram of the sentx module. figure 20-2 shows the construction of a typical 6-nibble data frame, with the num bers representing the minimum or maximum number of tick times for each section. note 1: this data sheet summarizes the features of this group of dspic33evxxxgm00x/ 10x family devices. it is not intended to be a comprehensive reference source. for more information on single-edge nibble transmission, refer to single- edge nibble transmission (sent) module (ds70005145) in the dspic33/ pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 238 ? 2013-2015 microchip technology inc. figure 20-1: sentx module block diagram figure 20-2: sentx protocol data frames sentxcon3 sentxcon2 sentxsync sync period nibble period detector sentxdath/l control and error detection sentxstat sentxcon1 sentx tx edge detect detector edge timing output driver transmitter only receiver only shared legend: sentx rx tick period generator sentx edge control sync period status data 1 data 2 data 3 data 4 data 5 data 6 crc pause (optional) 56 12-27 12-27 12-27 12-27 12-27 12-27 12-27 12-27 12-768 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 239 dspic33evxxxgm00x/10x family 20.2 transmit mode by default, the sentx module is configured for transmit operation. the module can be configured for continuous asynchronous message frame transmission, or alterna- tively, for synchronous mode triggered by software. when enabled, the transmitter will send a sync followed by the appropriate number of data nibbles, an optional crc and optional pause pulse. the tick period used by the sentx transmitter is set by writing a value to the ticktime<15:0> (sentxcon2<15:0>) bits. the tick period calculations are shown in equation 20-1 . equation 20-1: tick period calculation an optional pause pulse can be used in asynchronous mode to provide a fixed message frame time period. the frame period used by the sentx transmitter is set by writing a value to the frametime<15:0> (sentxcon3<15:0>) bits. the formulas used to calculate the value of frame time are shown in equation 20-2 . equation 20-2: frame time calculations 20.2.1 transmit mode configuration 20.2.1.1 initializing the sentx module: perform the following steps to initialize the module: 1. write rcven (sentxcon1<11>) = 0 for transmit mode. 2. write txm (sentxcon1<10>) = 0 for asynchronous transmit mode or txm = 1 for synchronous mode. 3. write nibcnt<2:0> (sentxcon1<2:0>) for the desired data frame length. 4. write crcen (sentxcon1<8>) for hardware or software crc calculation. 5. write ppp (sentxcon1<7>) for optional pause pulse. 6. if ppp = 1 , write t frame to sentxcon3. 7. write sentxcon2 with the appropriate value for desired tick period. 8. enable interrupts and set interrupt priority. 9. write initial status and data values to sentxdath/l. 10. if crcen = 0 , calculate crc and write the value to crc<3:0> (sentxdatl<3:0>). 11. set the snten (sentxcon1<15>) bit to enable the module. user software updates to sentxdath/l must be performed after the completion of the crc and before the next message frames status nibble. the recom- mended method is to use the message frame completion interrupt to trigger data writes. note: the module will not produce a pause period with less than 12 ticks, regard- less of the frametime<15:0> value. frametime<15:0> values beyond 2047 will have no effect on the length of a data frame. t tick t clk ticktime <15:0> =C 1 where: t frame = total time of the message from ms n = the number of data nibbles in message, 1-6 frametime <15:0> = t tick /t frame frametime <15:0> ? 122 + 27 n frametime <15:0> ? 848 + 12 n downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 240 ? 2013-2015 microchip technology inc. 20.3 receive mode the module can be configured for receive operation by setting the rcven (sentxcon1<11>) bit. the time between each falling edge is compared to syncmin<15:0> (sentxcon3<15:0>) and syncmax<15:0> (sentxcon2<15:0>), and if the measured time lies between the minimum and maximum limits, the module begins to receive data. the validated sync time is captured in the sentxsync register and the tick time is calculated. subsequent falling edges are verified to be within the valid data width and the data is stored in the sentxdath/l register. an interrupt event is generated at the completion of the message and the user software should read the sentx data register before the reception of the next nibble. the equation for syncmin<15:0> and syncmax<15:0> is shown in equation 20-3 . equation 20-3: syncmin<15:0> and syncmax<15:0> calculations for t tick = 3.0 ? s and f clk = 4 mhz, syncmin<15:0> = 76. 20.3.1 receive mode configuration 20.3.1.1 initializing the sentx module: perform the following steps to initialize the module: 1. write rcven (sentxcon1<11>) = 1 for receive mode. 2. write nibcnt<2:0> (sentxcon1<2:0>) for the desired data frame length. 3. write crcen (sentxcon1<8>) for hardware or software crc validation. 4. write ppp (sentxcon1<7>) = 1 if pause pulse is present. 5. write sentxcon2 with the value of syncmaxx (nominal sync period + 20%). 6. write sentxcon3 with the value of syncminx (nominal sync period C 20%). 7. enable interrupts and set interrupt priority. 8. set the snten (sentxcon1<15>) bit to enable the module. the data should be read from the sentxdath/l regis- ter after the completion of the crc and before the next message frames status nibble. the recommended method is to use the message frame completion interrupt trigger. note: to ensure a sync period can be identified, the value written to syncmin<15:0> must be less than the value written to syncmax<15:0>. where: t frame = total time of the message from ms n = the number of data nibbles in message, 1-6 f rcv = f cy x prescaler t clk = f cy /prescaler frametime <15:0> ? 848 + 12 n t tick = t clk ( ticktime <15:0> + 1) frametime <15:0> = t tick /t frame synccount = 8 x f rcv x t tick syncmin <15:0> = 0.8 x synccount syncmax <15:0> = 1.2 x synccount frametime <15:0> ? 122 + 27 n downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 241 dspic33evxxxgm00x/10x family register 20-1: sentxcon1: sentx control register 1 r/w-0 u-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 snten sntsidl rcven txm ( 1 ) txpol ( 1 ) crcen bit 15 bit 8 r/w-0 r/w-0 u-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 ppp spcen ( 2 ) p s nibcnt2 nibcnt1 nibcnt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 snten: sentx enable bit 1 = sentx is enabled 0 = sentx is disabled bit 14 unimplemented: read as 0 bit 13 sntsidl: sentx stop in idle mode bit 1 = discontinues module operation when the device enters idle mode 0 = continues module operation in idle mode bit 12 unimplemented: read as 0 bit 11 rcven: sentx receive enable bit 1 = sentx operates as a receiver 0 = sentx operates as a transmitter (sensor) bit 10 txm: sentx transmit mode bit ( 1 ) 1 = sentx transmits data frame only when triggered using the synctxen status bit 0 = sentx transmits data frames continuously while snten = 1 bit 9 txpol: sentx transmit polarity bit ( 1 ) 1 = sentx data output pin is low in the idle state 0 = sentx data output pin is high in the idle state bit 8 crcen: crc enable bit module in receive mode (rcven = 1 ): 1 = sentx performs crc verification on received data using the preferred j2716 m ethod 0 = sentx does not perform crc verification on received data module in transmit mode (rcven = 1 ): 1 = sentx automatically calculates crc using the preferred j2716 method 0 = sentx does not calculate crc bit 7 ppp: pause pulse present bit 1 = sentx is configured to transmit/receive sent messages with pause pulse 0 = sentx is configured to transmit/receive sent messages without pause pulse bit 6 spcen: short pwm code enable bit ( 2 ) 1 = spc control from external source is enabled 0 = spc control from external source is disabled bit 5 unimplemented: read as 0 bit 4 ps: sentx module clock prescaler (divider) bits 1 = divide-by-4 0 = divide-by-1 note 1: this bit has no function in receive mode (rcven = 1 ). 2: this bit has no function in transmit mode (rcven = 0 ). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 242 ? 2013-2015 microchip technology inc. bit 3 unimplemented: read as 0 bit 2-0 nibcnt<2:0>: nibble count control bits 111 = reserved; do not use 110 = module transmits/receives 6 data nibbles in a sent data pocket 101 = module transmits/receives 5 data nibbles in a sent data pocket 100 = module transmits/receives 4 data nibbles in a sent data pocket 011 = module transmits/receives 3 data nibbles in a sent data pocket 010 = module transmits/receives 2 data nibbles in a sent data pocket 001 = module transmits/receives 1 data nibbles in a sent data pocket 000 = reserved; do not use register 20-1: sentxcon1: sentx control register 1 (continued) note 1: this bit has no function in receive mode (rcven = 1 ). 2: this bit has no function in transmit mode (rcven = 0 ). downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 243 dspic33evxxxgm00x/10x family register 20-2: sentxstat: sentx status register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r/c-0 r-0 r/w-0, hc pause nib2 nib1 nib0 crcerr frmerr rxidle synctxen ( 1 ) bit 7 bit 0 legend: c = clearable bit hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7 pause: pause period status bit 1 = the module is transmitting/receiving a pause period 0 = the module is not transmitting/receiving a pause period bit 6-4 nib<2:0>: nibble status bit module in transmit mode (rcven = 0 ): 111 = module is transmitting a crc nibble 110 = module is transmitting data nibble 6 101 = module is transmitting data nibble 5 100 = module is transmitting data nibble 4 011 = module is transmitting data nibble 3 010 = module is transmitting data nibble 2 001 = module is transmitting data nibble 1 000 = module is transmitting a status nibble or pause period, or is not transmitting module in receive mode (rcven = 1 ): 111 = module is receiving a crc nibble or was receiving this nibble when an error occurred 110 = module is receiving data nibble 6 or was receiving this nibble when an error occurred 101 = module is receiving data nibble 5 or was receiving this nibble when an error occurred 100 = module is receiving data nibble 4 or was receiving this nibble when an error occurred 011 = module is receiving data nibble 3 or was receiving this nibble when an error occurred 010 = module is receiving data nibble 2 or was receiving this nibble when an error occurred 001 = module is receiving data nibble 1 or was receiving this nibble when an error occurred 000 = module is receiving a status nibble or waiting for sync bit 3 crcerr: crc status bit (receive mode only) 1 = a crc error occurred for the 1-6 data nibbles in sentxdath/l 0 = a crc error has not occurred bit 2 frmerr: framing error status bit (receive mode only) 1 = a data nibble was received with less than 12 tick periods or greater than 27 tick periods 0 = framing error has not occurred bit 1 rxidle: sentx receiver idle status bit (receive mode only) 1 = the sentx data bus has been idle (high) for a period of syncmax<15:0> or greater 0 = the sentx data bus is not idle note 1: in receive mode (rcven = 1 ), the synctxen bit is read-only. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 244 ? 2013-2015 microchip technology inc. bit 0 synctxen: sentx synchronization period status/transmit enable bit ( 1 ) module in receive mode (rcven = 1 ): 1 = a valid synchronization period was detected; the module is receiving nibble da ta 0 = no synchronization period has been detected; the module is not receiving nibble data module in asynchronous transmit mode (rcven = 0 , txm = 0 ): the bit always reads as 1 when the module is enabled, indicating the module transmits sentx data frames continuously. the bit reads 0 when the module is disabled. module in synchronous transmit mode (rcven = 0 , txm = 1 ): 1 = the module is transmitting a sentx data frame 0 = the module is not transmitting a data frame, user software may set synctxen to start another data frame transmission register 20-2: sentxstat: sentx status register (continued) note 1: in receive mode (rcven = 1 ), the synctxen bit is read-only. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 245 dspic33evxxxgm00x/10x family register 20-3: sentxdatl: sent x receive data register low ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 data4<3:0> data5<3:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 data6<3:0> crc<3:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 data4<3:0>: data nibble 4 data bits bit 11-8 data5<3:0>: data nibble 5 data bits bit 7-4 data6<3:0>: data nibble 6 data bits bit 3-0 crc<3:0>: crc nibble data bits note 1: register bits are read-only in receive mode (rcven = 1 ). in transmit mode, the crc<3:0> bits are read-only when automatic crc calculation is enabled (rcven = 0 , crcen = 1 ). register 20-4: sentxdath: sentx receive data register high ( 1 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 stat<3:0> data1<3:0> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 data2<3:0> data3<3:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 stat<3:0>: status nibble data bits bit 11-8 data1<3:0>: data nibble 1 data bits bit 7-4 data2<3:0>: data nibble 2 data bits bit 3-0 data3<3:0>: data nibble 3 data bits note 1: register bits are read-only in receive mode (rcven = 1 ). in transmit mode, the crc<3:0> bits are read-only when automatic crc calculation is enabled (rcven = 0 , crcen = 1 ). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 246 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 247 dspic33evxxxgm00x/10x family 21.0 universal asynchronous receiver transmitter (uart) the dspic33evxxxgm00x/10x family of devices contains two uart modules. the universal asynchronous receiver transmitter (uart) module is one of the serial i/o modules available in the dspic33evxxxgm00x/10x device family. the uart is a full-duplex, asynchronous system that can communicate with peripheral devices, such as personal computers, lin/j2602, rs-232 and rs-485 interfaces. the module also supports a hardware flow control option with the uxcts and uxrts pins, and also includes an irda ? encoder and decoder. the primary features of the uartx module are: full-duplex, 8 or 9-bit data transmission through the uxtx and uxrx pins even, odd or no parity options (for 8-bit data) one or two stop bits hardware flow control option with uxcts and uxrts pins fully integrated baud rate generator with 16-bit prescaler baud rates ranging from 4.375 mbps to 67 bps at 16x mode at 70 mips baud rates ranging from 17.5 mbps to 267 bps at 4x mode at 70 mips 4-deep first-in first-out (fifo) transmit data buffer 4-deep fifo receive data buffer parity, framing and buffer overrun error detection support for 9-bit mode with address detect (9 th bit = 1 ) transmit and receive interrupts a separate interrupt for all uart error conditions figure 21-1: uartx simp lified block diagram note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to universal asynchro- nous receiver transmitter (uart) (ds70000582) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: hardware flow control using uxrts and uxcts is not available on all pin count devices. see the pin diagrams section for availability. uxrx uartx receiver uartx transmitter uxtx baud rate generator uxrts /bclkx uxcts irda ? hardware flow control downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 248 ? 2013-2015 microchip technology inc. 21.1 uart helpful tips 1. in multi-node direct connect uart networks, uart receive inputs react to the complementary logic level defined by the urxinv bit (uxmode<4>), which defines the idle state, the default of which is logic high (i.e., urxinv = 0 ). because remote devices do not initialize at the same time, it is likely that one of the devices, because the rx line is floating, will trigger a start bit detection and will cause the first byte received, after the device has been initialized, to be invalid. to avoid this situation, the user should use a pull- up or pull-down resistor on the rx pin, depending on the value of the urxinv bit. a) if urxinv = 0 , use a pull-up resistor on the rx pin. b) if urxinv = 1 , use a pull-down resistor on the rx pin. 2. the first character received on wake-up from sleep mode, caused by activity on the uxrx pin of the uart module, will be invalid. in sleep mode, peripheral clocks are disabled. by the time the oscillator system has restarted and stabilized from sleep mode, the baud rate bit sampling clock, relative to the incoming uxrx bit timing, is no longer synchronized, resulting in the first character being invalid. this is to be expected. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 249 dspic33evxxxgm00x/10x family 21.2 uart control registers register 21-1: uxmode: uart x mode register r/w-0 u-0 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 uarten ( 1 ) usidl iren ( 2 ) rtsmd uen1 uen0 bit 15 bit 8 r/w-0, hc r/w-0 r/w-0, hc r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 wake lpback abaud urxinv brgh pdsel1 pdsel0 stsel bit 7 bit 0 legend: hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 uarten: uartx enable bit ( 1 ) 1 = uartx is enabled; all uartx pins are controlled by uartx as defined by uen<1:0> 0 = uartx is disabled; all uartx pins are controlled by port latches; uartx power consumpt ion is minimal bit 14 unimplemented: read as 0 bit 13 usidl: uartx stop in idle mode bit 1 = discontinues module operation when the device enters idle mode 0 = continues module operation in idle mode bit 12 iren: irda ? encoder and decoder enable bit ( 2 ) 1 = irda encoder and decoder are enabled 0 = irda encoder and decoder are disabled bit 11 rtsmd: mode selection for uxrts pin bit 1 =uxrts pin is in simplex mode 0 =uxrts pin is in flow control mode bit 10 unimplemented: read as 0 bit 9-8 uen<1:0>: uartx pin enable bits 11 = uxtx, uxrx and bclkx pins are enabled and used; uxcts pin is controlled by port latches ( 3 ) 10 = uxtx, uxrx, uxcts and uxrts pins are enabled and used ( 4 ) 01 = uxtx, uxrx and uxrts pins are enabled and used; uxcts pin is controlled by port latches ( 4 ) 00 = uxtx and uxrx pins are enabled and used; uxcts and uxrts /bclkx pins are controlled by port latches bit 7 wake: uartx wake-up on start bit detect during sleep mode enable bit 1 = uartx continues to sample the uxrx pin; interrupt is generated on the falling edge, bit is cleared in hardware on the following rising edge 0 = wake-up is not enabled bit 6 lpback: uartx loopback mode select bit 1 = loopback mode is enabled 0 = loopback mode is disabled note 1: refer to universal asynchronous receiver transmitter (uart) (ds70000582) in the dspic33/pic24 family reference manual for information on enabling the uart module for receive or transmit operation. 2: this feature is only available for the 16x brg mode (brgh = 0 ). 3: this feature is only available on 44-pin and 64-pin devices. 4: this feature is only available on 64-pin devices. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 250 ? 2013-2015 microchip technology inc. bit 5 abaud: auto-baud enable bit 1 = baud rate measurement on the next character is enabled C requires reception of a sync field (55h) before other data; cleared in hardware upon completion 0 = baud rate measurement is disabled or has completed bit 4 urxinv: uartx receive polarity inversion bit 1 = uxrx idle state is 0 0 = uxrx idle state is 1 bit 3 brgh: high baud rate enable bit 1 = brg generates 4 clocks per bit period (4x baud clock, high-speed mode) 0 = brg generates 16 clocks per bit period (16x baud clock, standard mode) bit 2-1 pdsel<1:0>: parity and data selection bits 11 = 9-bit data, no parity 10 = 8-bit data, odd parity 01 = 8-bit data, even parity 00 = 8-bit data, no parity bit 0 stsel: stop bit selection bit 1 = two stop bits 0 = one stop bit register 21-1: uxmode: uart x mode register (continued) note 1: refer to universal asynchronous receiver transmitter (uart) (ds70000582) in the dspic33/pic24 family reference manual for information on enabling the uart module for receive or transmit operation. 2: this feature is only available for the 16x brg mode (brgh = 0 ). 3: this feature is only available on 44-pin and 64-pin devices. 4: this feature is only available on 64-pin devices. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 251 dspic33evxxxgm00x/10x family register 21-2: u x sta: uart x status and control register r/w-0 r/w-0 r/w-0 u-0 r/w-0, hc r/w-0 r-0 r-1 utxisel1 utxinv utxisel0 utxbrk utxen ( 1 ) utxbf trmt bit 15 bit 8 r/w-0 r/w-0 r/w-0 r-1 r-0 r-0 r/c-0 r-0 urxisel1 urxisel0 adden ridle perr ferr oerr urxda bit 7 bit 0 legend: c = clearable bit hc = hardware clearable bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15,13 utxisel<1:0>: uartx transmission interrupt mode selection bits 11 = reserved; do not use 10 = interrupt when a character is transferred to the transmit shift register (tsr), and as a result, the transmit buffer becomes empty 01 = interrupt when the last character is shifted out of the transmit shift register; all transmit operations are completed 00 = interrupt when a character is transferred to the transmit shift register (this implies there is at least one character open in the transmit buffer) bit 14 utxinv: uartx transmit polarity inversion bit if iren = 0 : 1 = uxtx idle state is 0 0 = uxtx idle state is 1 if iren = 1 : 1 =irda ? encoded uxtx idle state is 1 0 = irda encoded uxtx idle state is 0 bit 12 unimplemented: read as 0 bit 11 utxbrk: uartx transmit break bit 1 = sends sync break on next transmission C start bit, followed by twelve 0 bits, followed by stop bit; cleared by hardware upon completion 0 = sync break transmission is disabled or has completed bit 10 utxen: uartx transmit enable bit ( 1 ) 1 = transmit is enabled, uxtx pin is controlled by uartx 0 = transmit is disabled, any pending transmission is aborted and the buffer is reset; uxtx pin is controlled by the port bit 9 utxbf: uartx transmit buffer full status bit (read-only) 1 = transmit buffer is full 0 = transmit buffer is not full, at least one more character can be written bit 8 trmt: transmit shift register (tsr) empty bit (read-only) 1 = transmit shift register is empty and transmit buffer is empty (the last transmission has completed) 0 = transmit shift register is not empty, a transmission is in progress or queued bit 7-6 urxisel<1:0>: uartx receive interrupt mode selection bits 11 = interrupt is set on uxrsr transfer, making the receive buffer full (i.e., has 4 data characters) 10 = interrupt is set on uxrsr transfer, making the receive buffer 3/4 full (i.e., has 3 data characters) 0x = interrupt is set when any character is received and transferred from the uxrsr to the receive buffer; receive buffer has one or more characters note 1: refer to universal asynchronous receiver transmitter (uart) (ds70000582) in the dspic33/ pic24 family reference manual for information on enabling the uart module for transmit operation. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 252 ? 2013-2015 microchip technology inc. bit 5 adden: address character detect bit (bit 8 of received data = 1 ) 1 = address detect mode is enabled; if 9-bit mode is not selected, this does not take effect 0 = address detect mode is disabled bit 4 ridle: receiver idle bit (read-only) 1 = receiver is idle 0 = receiver is active bit 3 perr: parity error status bit (read-only) 1 = parity error has been detected for the current character (character at the top of the receive fifo) 0 = parity error has not been detected bit 2 ferr: framing error status bit (read-only) 1 = framing error has been detected for the current character (character at the top of the receive fifo) 0 = framing error has not been detected bit 1 oerr: receive buffer overrun error status bit (clear/read-only) 1 = receive buffer has overflowed 0 = receive buffer has not overflowed; clearing a previously set oerr bit ( 1 ? 0 transition) resets the receive buffer and the uxrsr to the empty state bit 0 urxda: uartx receive buffer data available bit (read-only) 1 = receive buffer has data, at least one more character can be read 0 = receive buffer is empty register 21-2: u x sta: uart x status and control register (continued) note 1: refer to universal asynchronous receiver transmitter (uart) (ds70000582) in the dspic33/ pic24 family reference manual for information on enabling the uart module for transmit operation. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 253 dspic33evxxxgm00x/10x family 22.0 controller area network (can) module (dspic33evxxxgm10x devices only) 22.1 overview the controller area network (can) module is a serial interface, useful for communicating with other can modules or microcontroller devices. this interface/ protocol was designed to allow communications within noisy environments. the dspic33evxxxgm10x devices contain one can module. the can module is a communication controller imple- menting the can 2.0 a/b protocol, as defined in the bosch can specification. the module supports can 1.2, can 2.0a, can 2.0b passive and can 2.0b active versions of the protocol. the module implemen- tation is a full can system. the can specification is not covered within this data sheet. the reader can refer to the bosch can specification for further details. the can module features are as follows: implementation of the can protocol, can 1.2, can2.0a and can2.0b standard and extended data frames 0 to 8-byte data length programmable bit rate, up to 1 mbit/sec automatic response to remote transmission requests up to eight transmit buffers with application specified prioritization and abort capability (each buffer can contain up to 8 bytes of data) up to 32 receive buffers (each buffer can contain up to 8 bytes of data) up to 16 full (standard/extended identifier) acceptance filters three full acceptance filter masks devicenet? addressing support programmable wake-up functionality with integrated low-pass filter programmable loopback mode supports self-test operation signaling through interrupt capabilities for all can receiver and transmitter error states programmable clock source programmable link to input capture 2 (ic2) module for timestamping and network synchronization low-power sleep and idle modes the can bus module consists of a protocol engine and message buffering/control. the can protocol engine handles all functions for receiving and transmitting messages on the can bus. messages are transmitted by first loading the appropriate data registers. status and errors can be checked by reading the appropriate registers. any message detected on the can bus is checked for errors, and then matched against filters to see if it should be received and stored in one of the receive registers. figure 22-1 shows a block diagram of the canx module. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to enhanced controller area network (ecan?) (ds70353) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 254 ? 2013-2015 microchip technology inc. figure 22-1: canx mo dule block diagram 22.2 modes of operation the canx module can operate in one of several operation modes selected by the user. these modes include: initialization mode disable mode normal operation mode listen only mode listen all messages mode loopback mode modes are requested by setting the reqop<2:0> bits (cxctrl1<10:8>). entry into a mode is acknowledged by monitoring the opmode<2:0> bits (cxctrl1<7:5>). the module does not change the mode and the opmodex bits until a change in mode is acceptable, generally during bus idle time, which is defined as at least 11 consecutive recessive bits. message assembly can protocol engine cxtx buffer cxrx rxf14 filter rxf13 filter rxf12 filter rxf11 filter rxf10 filter rxf9 filter rxf8 filter rxf7 filter rxf6 filter rxf5 filter rxf4 filter rxf3 filter rxf2 filter rxf1 filter rxf0 filter transmit byte sequencer rxm1 mask rxm0 mask control configuration logic cpu bus interrupts trb0 tx/rx buffer control register rxf15 filter rxm2 mask trb7 tx/rx buffer control register trb6 tx/rx buffer control register trb5 tx/rx buffer control register trb4 tx/rx buffer control register trb3 tx/rx buffer control register trb2 tx/rx buffer control register trb1 tx/rx buffer control register dma controller control downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 255 dspic33evxxxgm00x/10x family 22.3 can control registers register 22-1: cxctrl1: canx control register 1 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 csidl abat cancks reqop2 reqop1 reqop0 bit 15 bit 8 r-1 r-0 r-0 u-0 r/w-0 u-0 u-0 r/w-0 opmode2 opmode1 opmode0 cancap w i n bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 csidl: canx stop in idle mode bit 1 = discontinues module operation when the device enters idle mode 0 = continues module operation in idle mode bit 12 abat: abort all pending transmissions bit 1 = signals all transmit buffers to abort transmission 0 = module will clear this bit when all transmissions are aborted bit 11 cancks: canx module clock (f can ) source select bit 1 = f can is equal to 2 * f p 0 = f can is equal to f p bit 10-8 reqop<2:0>: request operation mode bits 111 = sets listen all messages mode 110 = reserved 101 = reserved 100 = sets configuration mode 011 = sets listen only mode 010 = sets loopback mode 001 = sets disable mode 000 = sets normal operation mode bit 7-5 opmode<2:0> : operation mode bits 111 = module is in listen all messages mode 110 = reserved 101 = reserved 100 = module is in configuration mode 011 = module is in listen only mode 010 = module is in loopback mode 001 = module is in disable mode 000 = module is in normal operation mode bit 4 unimplemented: read as 0 bit 3 cancap: canx message receive timer capture event enable bit 1 = enables input capture based on can message receive 0 = disables can capture bit 2-1 unimplemented: read as 0 bit 0 win: sfr map window select bit 1 = uses filter window 0 = uses buffer window downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 256 ? 2013-2015 microchip technology inc. register 22-2: cxctrl2: canx control register 2 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 dncnt<4:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 unimplemented: read as 0 bit 4-0 dncnt<4:0>: devicenet? filter bit number bits 10010 - 11111 = invalid selection 10001 = compare up to data byte 3, bit 6 with eid<17> 00001 = compare up to data byte 1, bit 7 with eid<0> 00000 = do not compare data bytes downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 257 dspic33evxxxgm00x/10x family register 22-3: cxvec: canx interrupt code register u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 filhit4 filhit3 filhit2 filhit1 filhit0 bit 15 bit 8 u-0 r-1 r-0 r-0 r-0 r-0 r-0 r-0 icode6 icode5 icode4 icode3 icode2 icode1 icode0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-8 filhit<4:0>: filter hit number bits 10000 - 11111 = reserved 01111 = filter 15 00001 = filter 1 00000 = filter 0 bit 7 unimplemented: read as 0 bit 6-0 icode<6:0>: interrupt flag code bits 1000101 - 1111111 = reserved 1000100 = fifo almost full interrupt 1000011 = receiver overflow interrupt 1000010 = wake-up interrupt 1000001 = error interrupt 1000000 = no interrupt 0010000 - 0111111 = reserved 0001111 = rb15 buffer interrupt 0001001 = rb9 buffer interrupt 0001000 = rb8 buffer interrupt 0000111 = trb7 buffer interrupt 0000110 = trb6 buffer interrupt 0000101 = trb5 buffer interrupt 0000100 = trb4 buffer interrupt 0000011 = trb3 buffer interrupt 0000010 = trb2 buffer interrupt 0000001 = trb1 buffer interrupt 0000000 = trb0 buffer interrupt downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 258 ? 2013-2015 microchip technology inc. register 22-4: cxfctrl: can x fifo control register r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 u-0 u-0 dmabs2 dmabs1 dmabs0 bit 15 bit 8 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 fsa5 fsa4 fsa3 fsa2 fsa1 fsa0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 dmabs<2:0>: dma buffer size bits 111 = reserved 110 = 32 buffers in ram 101 = 24 buffers in ram 100 = 16 buffers in ram 011 = 12 buffers in ram 010 = 8 buffers in ram 001 = 6 buffers in ram 000 = 4 buffers in ram bit 12-6 unimplemented: read as 0 bit 5-0 fsa<5:0>: fifo area starts with buffer bits 11111 = receive buffer rb31 11110 = receive buffer rb30 00001 = tx/rx buffer trb1 00000 = tx/rx buffer trb0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 259 dspic33evxxxgm00x/10x family register 22-5: cxfifo: canx fifo status register u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 fbp5 fbp4 fbp3 fbp2 fbp1 fbp0 bit 15 bit 8 u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 fnrb5 fnrb4 fnrb3 fnrb2 fnrb1 fnrb0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13-8 fbp<5:0>: fifo buffer pointer bits 011111 = rb31 buffer 011110 = rb30 buffer 000001 = trb1 buffer 000000 = trb0 buffer bit 7-6 unimplemented: read as 0 bit 5-0 fnrb<5:0>: fifo next read buffer pointer bits 011111 = rb31 buffer 011110 = rb30 buffer 000001 = trb1 buffer 000000 = trb0 buffer downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 260 ? 2013-2015 microchip technology inc. register 22-6: cxintf: canx interrupt flag register u-0 u-0 r-0 r-0 r-0 r-0 r-0 r-0 txbo txbp rxbp txwar rxwar ewarn bit 15 bit 8 r/c-0 r/c-0 r/c-0 u-0 r/c-0 r/c-0 r/c-0 r/c-0 ivrif wakif errif fifoif rbovif rbif tbif bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 unimplemented: read as 0 bit 13 txbo: transmitter in error state bus off bit 1 = transmitter is in bus off state 0 = transmitter is not in bus off state bit 12 txbp: transmitter in error state bus passive bit 1 = transmitter is in bus passive state 0 = transmitter is not in bus passive state bit 11 rxbp: receiver in error state bus passive bit 1 = receiver is in bus passive state 0 = receiver is not in bus passive state bit 10 txwar: transmitter in error state warning bit 1 = transmitter is in error warning state 0 = transmitter is not in error warning state bit 9 rxwar: receiver in error state warning bit 1 = receiver is in error warning state 0 = receiver is not in error warning state bit 8 ewarn: transmitter or receiver in error state warning bit 1 = transmitter or receiver is in error warning state 0 = transmitter or receiver is not in error warning state bit 7 ivrif: invalid message interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 6 wakif: bus wake-up activity interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 5 errif: error interrupt flag bit (multiple sources in cxintf<13:8> register) 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 4 unimplemented: read as 0 bit 3 fifoif: fifo almost full interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 2 rbovif: rx buffer overflow interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 261 dspic33evxxxgm00x/10x family bit 1 rbif: rx buffer interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred bit 0 tbif: tx buffer interrupt flag bit 1 = interrupt request has occurred 0 = interrupt request has not occurred register 22-6: cxintf: canx interrupt flag register (continued) register 22-7: cxinte: canx interrupt enable register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 ivrie wakie errie fifoie rbovie rbie tbie bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7 ivrie: invalid message interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 6 wakie: bus wake-up activity interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 5 errie: error interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 4 unimplemented: read as 0 bit 3 fifoie: fifo almost full interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 2 rbovie: rx buffer overflow interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 1 rbie: rx buffer interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled bit 0 tbie: tx buffer interrupt enable bit 1 = interrupt request is enabled 0 = interrupt request is not enabled downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 262 ? 2013-2015 microchip technology inc. register 22-8: cxec: canx transmit/receive error count register r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 terrcnt<7:0> bit 15 bit 8 r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 rerrcnt<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 terrcnt<7:0>: transmit error count bits bit 7-0 rerrcnt<7:0>: receive error count bits register 22-9: cxcfg1: canx bau d rate configuratio n register 1 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 unimplemented: read as 0 bit 7-6 sjw<1:0>: synchronization jump width bits 11 = length is 4 x t q 10 = length is 3 x t q 01 = length is 2 x t q 00 = length is 1 x t q bit 5-0 brp<5:0>: baud rate prescaler bits 11 1111 = t q = 2 x 64 x 1/f can 00 0010 = t q = 2 x 3 x 1/f can 00 0001 = t q = 2 x 2 x 1/f can 00 0000 = t q = 2 x 1 x 1/f can downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 263 dspic33evxxxgm00x/10x family register 22-10: cxcfg2: canx bau d rate configuratio n register 2 u-0 r/w-x u-0 u-0 u-0 r/w-x r/w-x r/w-x wakfil seg2ph2 seg2ph1 seg2ph0 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x seg2phts sam seg1ph2 seg1ph1 seg1ph0 prseg2 prseg1 prseg0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 unimplemented: read as 0 bit 14 wakfil: select can bus line filter for wake-up bit 1 = uses can bus line filter for wake-up 0 = can bus line filter is not used for wake-up bit 13-11 unimplemented: read as 0 bit 10-8 seg2ph<2:0>: phase segment 2 bits 111 = length is 8 x t q 000 = length is 1 x t q bit 7 seg2phts: phase segment 2 time select bit 1 = freely programmable 0 = maximum of seg1ph<2:0> bits or information processing time (ipt), whic hever is greater bit 6 sam: sample of the can bus line bit 1 = bus line is sampled three times at the sample point 0 = bus line is sampled once at the sample point bit 5-3 seg1ph<2:0>: phase segment 1 bits 111 = length is 8 x t q 000 = length is 1 x t q bit 2-0 prseg<2:0>: propagation time segment bits 111 = length is 8 x t q 000 = length is 1 x t q downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 264 ? 2013-2015 microchip technology inc. register 22-11: cxfen1: canx acceptance filter enable register 1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 flten<15:8> bit 15 bit 8 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 flten<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 flten<15:0>: enable filter n to accept messages bits 1 = enables filter n 0 = disables filter n register 22-12: cxbufpnt1: canx filters 0-3 buffer pointer register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f3bp3 f3bp2 f3bp1 f3bp0 f2bp3 f2bp2 f2bp1 f2bp0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f1bp3 f1bp2 f1bp1 f1bp0 f0bp3 f0bp2 f0bp1 f0bp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 f3bp<3:0>: rx buffer mask for filter 3 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f2bp<3:0>: rx buffer mask for filter 2 bits (same values as bits 15-12) bit 7-4 f1bp<3:0>: rx buffer mask for filter 1 bits (same values as bits 15-12) bit 3-0 f0bp<3:0>: rx buffer mask for filter 0 bits (same values as bits 15-12) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 265 dspic33evxxxgm00x/10x family register 22-13: cxbufpnt2: canx filters 4-7 buffer pointer register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f7bp3 f7bp2 f7bp1 f7bp0 f6bp3 f6bp2 f6bp1 f6bp0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f5bp3 f5bp2 f5bp1 f5bp0 f4bp3 f4bp2 f4bp1 f4bp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 f7bp<3:0>: rx buffer mask for filter 7 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f6bp<3:0>: rx buffer mask for filter 6 bits (same values as bits 15-12) bit 7-4 f5bp<3:0>: rx buffer mask for filter 5 bits (same values as bits 15-12) bit 3-0 f4bp<3:0>: rx buffer mask for filter 4 bits (same values as bits 15-12) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 266 ? 2013-2015 microchip technology inc. register 22-14: cxbufpnt3: canx filters 8-11 buffer pointer register 3 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f11bp3 f11bp2 f11bp1 f11bp0 f10bp3 f10bp2 f10bp1 f10bp0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f9bp3 f9bp2 f9bp1 f9bp0 f8bp3 f8bp2 f8bp1 f8bp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 f11bp<3:0>: rx buffer mask for filter 11 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f10bp<3:0>: rx buffer mask for filter 10 bits (same values as bits 15-12) bit 7-4 f9bp<3:0>: rx buffer mask for filter 9 bits (same values as bits 15-12) bit 3-0 f8bp<3:0>: rx buffer mask for filter 8 bits (same values as bits 15-12) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 267 dspic33evxxxgm00x/10x family register 22-15: cxbufpnt4: canx filters 12-15 buffer pointer register 4 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f15bp3 f15bp2 f15bp1 f15bp0 f14bp3 f14bp2 f14bp1 f14bp0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f13bp3 f13bp2 f13bp1 f13bp0 f12bp3 f12bp2 f12bp1 f12bp0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 f15bp<3:0>: rx buffer mask for filter 15 bits 1111 = filter hits received in rx fifo buffer 1110 = filter hits received in rx buffer 14 0001 = filter hits received in rx buffer 1 0000 = filter hits received in rx buffer 0 bit 11-8 f14bp<3:0>: rx buffer mask for filter 14 bits (same values as bits 15-12) bit 7-4 f13bp<3:0>: rx buffer mask for filter 13 bits (same values as bits 15-12) bit 3-0 f12bp<3:0>: rx buffer mask for filter 12 bits (same values as bits 15-12) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 268 ? 2013-2015 microchip technology inc. register 22-16: cxrxfnsid: canx acceptance filter n standard identifier register (n = 0-15) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 bit 15 bit 8 r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 exide e i d 1 7e i d 1 6 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 sid<10:0>: standard identifier bits 1 = message address bit, sidx, must be 1 to match filter 0 = message address bit, sidx, must be 0 to match filter bit 4 unimplemented: read as 0 bit 3 exide: extended identifier enable bit if mide = 1 : 1 = matches only messages with extended identifier addresses 0 = matches only messages with standard identifier addresses if mide = 0 : ignores exide bit. bit 2 unimplemented: read as 0 bit 1-0 eid<17:16>: extended identifier bits 1 = message address bit, eidx, must be 1 to match filter 0 = message address bit, eidx, must be 0 to match filter register 22-17: cxrxfneid: canx acceptance filter n extended identifier register (n = 0-15) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 eid<15:0>: extended identifier bits 1 = message address bit, eidx, must be 1 to match filter 0 = message address bit, eidx, must be 0 to match filter downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 269 dspic33evxxxgm00x/10x family register 22-18: cxfmsksel1: can x filters 7-0 mask selection register 1 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f7msk1 f7msk0 f6msk1 f6msk0 f5msk1 f5msk0 f4msk1 f4msk0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f3msk1 f3msk0 f2msk1 f2msk0 f1msk1 f1msk0 f0msk1 f0msk0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 f7msk<1:0>: mask source for filter 7 bit 11 = reserved 10 = acceptance mask 2 registers contain the mask 01 = acceptance mask 1 registers contain the mask 00 = acceptance mask 0 registers contain the mask bit 13-12 f6msk<1:0>: mask source for filter 6 bit (same values as bits 15-14) bit 11-10 f5msk<1:0>: mask source for filter 5 bit (same values as bits 15-14) bit 9-8 f4msk<1:0>: mask source for filter 4 bit (same values as bits 15-14) bit 7-6 f3msk<1:0>: mask source for filter 3 bit (same values as bits 15-14) bit 5-4 f2msk<1:0>: mask source for filter 2 bit (same values as bits 15-14) bit 3-2 f1msk<1:0>: mask source for filter 1 bit (same values as bits 15-14) bit 1-0 f0msk<1:0>: mask source for filter 0 bit (same values as bits 15-14) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 270 ? 2013-2015 microchip technology inc. register 22-19: cxfmsksel2: can x filters 15-8 mask selection register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f15msk1 f15msk0 f14msk1 f14msk0 f13msk f13msk0 f12msk1 f12msk0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 f11msk1 f11msk0 f10msk1 f10msk0 f9msk1 f9msk0 f8msk1 f8msk0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-14 f15msk<1:0>: mask source for filter 15 bit 11 = reserved 10 = acceptance mask 2 registers contain the mask 01 = acceptance mask 1 registers contain the mask 00 = acceptance mask 0 registers contain the mask bit 13-12 f14msk<1:0>: mask source for filter 14 bit (same values as bits 15-14) bit 11-10 f13msk<1:0>: mask source for filter 13 bit (same values as bits 15-14) bit 9-8 f12msk<1:0>: mask source for filter 12 bit (same values as bits 15-14) bit 7-6 f11msk<1:0>: mask source for filter 11 bit (same values as bits 15-14) bit 5-4 f10msk<1:0>: mask source for filter 10 bit (same values as bits 15-14) bit 3-2 f9msk<1:0>: mask source for filter 9 bit (same values as bits 15-14) bit 1-0 f8msk<1:0>: mask source for filter 8 bit (same values as bits 15-14) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 271 dspic33evxxxgm00x/10x family register 22-20: cxrxmnsid: can x acceptance filter mask n standard identifier register (n = 0-2) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 bit 15 bit 8 r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 m i d e e i d 1 7e i d 1 6 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-5 sid<10:0>: standard identifier bits 1 = includes bit, sidx, in filter comparison 0 = bit, sidx, is a dont care in filter comparison bit 4 unimplemented: read as 0 bit 3 mide: identifier receive mode bit 1 = matches only message types (standard or extended address) that correspond to the exide bit in the filter 0 = matches either standard or extended address message if filters match, i.e., if: (filter sid) = (message sid) or if (filter sid/eid) = (message sid/eid) bit 2 unimplemented: read as 0 bit 1-0 eid<17:16>: extended identifier bits 1 = includes bit, eidx, in filter comparison 0 = bit, eidx, is a dont care in filter comparison register 22-21: cxrxmneid: can x acceptance filter mask n extended identifier register (n = 0-2) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 eid<15:0>: extended identifier bits 1 = includes bit, eidx, in filter comparison 0 = bit, eidx, is a dont care in filter comparison downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 272 ? 2013-2015 microchip technology inc. register 22-22: cxrxful1: canx receive buffer full register 1 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful<15:8> bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful<7:0> bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rxful<15:0>: receive buffer n full bits 1 = buffer is full (set by module) 0 = buffer is empty (cleared by user software) register 22-23: cxrxful2: canx receive buffer full register 2 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful<31:24> bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxful<23:16> bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rxful<31:16>: receive buffer n full bits 1 = buffer is full (set by module) 0 = buffer is empty (cleared by user software) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 273 dspic33evxxxgm00x/10x family register 22-24: cxrxovf1: canx receive buffer overflow register 1 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf<15:8> bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf<7:0> bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rxovf<15:0>: receive buffer n overflow bits 1 = module attempted to write to a full buffer (set by module) 0 = no overflow condition (cleared by user software) register 22-25: cxrxovf2: canx receive buffer overflow register 2 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf<31:24> bit 15 bit 8 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 r/c-0 rxovf<23:16> bit 7 bit 0 legend: c = writable bit, but only 0 can be written to clear the bit r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 rxovf<31:16>: receive buffer n overflow bits 1 = module attempted to write to a full buffer (set by module) 0 = no overflow condition (cleared by user software) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 274 ? 2013-2015 microchip technology inc. register 22-26: cxtrmncon: canx tx/rx buffer mn control register (m = 0,2,4,6; n = 1,3,5,7) r/w-0 r-0 r-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 txenn txabtn txlarbn txerrn txreqn rtrenn txnpri1 txnpri0 bit 15 bit 8 r/w-0 r-0 r-0 r-0 r/w-0 r/w-0 r/w-0 r/w-0 txenm txabtm ( 1 ) txlarbm ( 1 ) txerrm ( 1 ) txreqm rtrenm txmpri1 txmpri0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 see definition for bits 7-0, controls buffer n. bit 7 txenm: tx/rx buffer selection bit 1 = buffer, trbm, is a transmit buffer 0 = buffer, trbm, is a receive buffer bit 6 txabtm: message aborted bit ( 1 ) 1 = message was aborted 0 = message completed transmission successfully bit 5 txlarbm: message lost arbitration bit ( 1 ) 1 = message lost arbitration while being sent 0 = message did not lose arbitration while being sent bit 4 txerrm: error detected during transmission bit ( 1 ) 1 = a bus error occurred while the message was being sent 0 = a bus error did not occur while the message was being sent bit 3 txreqm: message send request bit 1 = requests that a message be sent; the bit automatically clears when the message is successfully sent 0 = clearing the bit to 0 while set requests a message abort bit 2 rtrenm: auto-remote transmit enable bit 1 = when a remote transmit is received, txreq will be set 0 = when a remote transmit is received, txreq will be unaffected bit 1-0 txmpri<1:0>: message transmission priority bits 11 = highest message priority 10 = high intermediate message priority 01 = low intermediate message priority 00 = lowest message priority note 1: this bit is cleared when txreqm is set. note: the buffers, sid, eid, dlc, data field and receive status registers, are located in dma ram . downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 275 dspic33evxxxgm00x/10x family 22.4 can message buffers can message buffers are part of ram memory. they are not can special function registers. the user appli- cation must directly write into the ram area that is configured for can message buffers. the location and size of the buffer area is defined by the user application. buffer 22-1: canx message buffer word 0 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid5 sid4 sid3 sid2 sid1 sid0 srr ide bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-2 sid<10:0>: standard identifier bits bit 1 srr: substitute remote request bit when ide = 0 : 1 = message will request remote transmission 0 = normal message when ide = 1 : the srr bit must be set to 1 . bit 0 ide: extended identifier bit 1 = message will transmit an extended identifier 0 = message will transmit a standard identifier buffer 22-2: canx message buffer word 1 u-0 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x e i d < 1 7 : 1 4 > bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid<13:6> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-0 eid<17:6>: extended identifier bits downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 276 ? 2013-2015 microchip technology inc. ( buffer 22-3: canx message buffer word 2 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid5 eid4 eid3 eid2 eid1 eid0 rtr rb1 bit 15 bit 8 u-x u-x u-x r/w-x r/w-x r/w-x r/w-x r/w-x rb0 dlc3 dlc2 dlc1 dlc0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-10 eid<5:0>: extended identifier bits bit 9 rtr: remote transmission request bit when ide = 1 : 1 = message will request remote transmission 0 = normal message when ide = 0 : the rtr bit is ignored. bit 8 rb1: reserved bit 1 user must set this bit to 0 per can protocol. bit 7-5 unimplemented: read as 0 bit 4 rb0: reserved bit 0 user must set this bit to 0 per can protocol. bit 3-0 dlc<3:0>: data length code bits buffer 22-4: can x message buffer word 3 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 1<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 0<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 byte 1<15:8>: canx message byte 1 bits bit 7-0 byte 0<7:0>: canx message byte 0 bits downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 277 dspic33evxxxgm00x/10x family buffer 22-5: can x message buffer word 4 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 3<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 2<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 byte 3<15:8>: canx message byte 3 bits bit 7-0 byte 2<7:0>: canx message byte 2 bits buffer 22-6: can x message buffer word 5 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 5<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 4<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 byte 5<15:8>: canx message byte 5 bits bit 7-0 byte 4<7:0>: canx message byte 4 bits downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 278 ? 2013-2015 microchip technology inc. buffer 22-7: can x message buffer word 6 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 7<15:8> bit 15 bit 8 r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x byte 6<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-8 byte 7<15:8>: canx message byte 7 bits bit 7-0 byte 6<7:0>: canx message byte 6 bits buffer 22-8: canx message buffer word 7 u-0 u-0 u-0 r/w-x r/w-x r/w-x r/w-x r/w-x filhit<4:0> ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-8 filhit<4:0>: filter hit code bits ( 1 ) encodes number of filter that resulted in writing this buffer. bit 7-0 unimplemented: read as 0 note 1: only written by module for receive buffers, unused for transmit buffers. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 279 dspic33evxxxgm00x/10x family 23.0 charge time measurement unit (ctmu) the charge time measurement unit (ctmu) is a flexible analog module that provides accurate differential time measurement between pulse sources, as well as asynchronous pulse generation. its key features include: nine edge input trigger sources polarity control for each edge source control of edge sequence control of response to edges time measurement resolution down to 200 ps accurate current source suitable for capacitive measurement on-chip temperature measurement using a built-in diode pulse generation generates a pulse using the c1inb comparator input and outputs the pulse onto the ctpls remappable output together with other on-chip analog modules, the ctmu can be used to precisely measure time, measure capacitance, measure relative changes in capacitance or generate output pulses that are independent of the system clock. the ctmu module is ideal for interfacing with capacitive-based sensors. the ctmu is controlled through three registers: ctmucon1, ctmucon2 and ctmuicon. ctmucon1 and ctmucon2 enable the module and control edge source selection, edge source polarity selection and edge sequencing. the ctmuicon register controls the selection and trim of the current source. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to charge time measure- ment unit (ctmu) (ds70661) in the dspic33/pic24 family reference manual , which is available on the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 280 ? 2013-2015 microchip technology inc. figure 23-1: ctmu block diagram cted1 cted2 current source edge ctmucon1 or ctmucon2 pulse generator ctmui to adc (1) cmp1 timer1 oc1 current control itrim<5:0> irng<1:0> ctmuicon ctmu control logic edg1stat edg2stat analog-to-digital ctpls ic1 cmp1 c1in1- cdelay ctmu temp ctmu temperature sensor current control selection tgen edg1stat, edg2stat ctmu temp 0 edg1stat = edg2stat ctmui to adc 0 edg1stat ? edg2stat ctmup 1 edg1stat ? edg2stat no connect 1 edg1stat = edg2stat trigger tgen ctmup external capacitor for pulse generation note 1: current source to particular anx pins is provided only when 10-bit adc mode is chosen. control logic f osc osci pin frc bfrc lprc downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 281 dspic33evxxxgm00x/10x family 23.1 ctmu control registers register 23-1: ctmucon1: ct mu control register 1 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ctmuen c t m u s i d lt g e n ( 2 ) edgen edgseqen idissen ( 1 ) cttrig bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ctmuen: ctmu enable bit 1 = module is enabled 0 = module is disabled bit 14 unimplemented: read as 0 bit 13 ctmusidl: ctmu stop in idle mode bit 1 = discontinues module operation when the device enters idle mode 0 = continues module operation in idle mode bit 12 tgen: time generation enable bit ( 2 ) 1 = edge delay generation is enabled 0 = edge delay generation is disabled bit 11 edgen: edge enable bit 1 = hardware modules are used to trigger edges (tmrx, ctedx, etc.) 0 = software is used to trigger edges (manual set of edgxstat) bit 10 edgseqen: edge sequence enable bit 1 = edge 1 event must occur before edge 2 event can occur 0 = no edge sequence is needed bit 9 idissen: analog current source control bit ( 1 ) 1 = analog current source output is grounded 0 = analog current source output is not grounded bit 8 cttrig: adc trigger control bit 1 = ctmu triggers the adc start of conversion 0 = ctmu does not trigger the adc start of conversion bit 7-0 unimplemented: read as 0 note 1: the adc module sample-and-hold (s&h) capacitor is not automatically discharg ed between sample/ conversion cycles. any software using the adc as part of a capacitance measurement must discharge the adc capacitor before conducting the measurement. the idissen bit, when set to 1 , performs this func- tion. the adc must be sampling while the idissen bit is active to connect the discharge sink to the capacitor array. 2: if the tgen bit is set to 1 , then the cmp1 module should be selected as the edge 2 source in the edg2selx bits field; otherwise, the module will not function. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 282 ? 2013-2015 microchip technology inc. register 23-2: ctmucon2: ct mu control register 2 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 edg1mod edg1pol edg1sel3 edg1sel2 edg1sel1 edg1sel0 edg2stat edg1stat bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 u-0 u-0 edg2mod edg2pol edg2sel3 edg2sel2 edg2sel1 edg2sel0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 edg1mod: edge 1 edge sampling mode selection bit 1 = edge 1 is edge-sensitive 0 = edge 1 is level-sensitive bit 14 edg1pol: edge 1 polarity select bit 1 = edge 1 is programmed for a positive edge response 0 = edge 1 is programmed for a negative edge response bit 13-10 edg1sel<3:0>: edge 1 source select bits 1111 = f osc 1110 = osci pin 1101 = frc oscillator 1100 = bfrc oscillator 1011 = internal lprc oscillator 1010 = reserved 1001 = reserved 1000 = reserved 0111 = reserved 0110 = reserved 0101 = reserved 0100 = reserved 0011 = cted1 pin 0010 = cted2 pin 0001 = oc1 module 0000 = tmr1 module bit 9 edg2stat: edge 2 status bit indicates the status of edge 2 and can be written to control the edge source. 1 = edge 2 has occurred 0 = edge 2 has not occurred bit 8 edg1stat: edge 1 status bit indicates the status of edge 1 and can be written to control the edge source. 1 = edge 1 has occurred 0 = edge 1 has not occurred bit 7 edg2mod: edge 2 edge sampling mode selection bit 1 = edge 2 is edge-sensitive 0 = edge 2 is level-sensitive bit 6 edg2pol: edge 2 polarity select bit 1 = edge 2 is programmed for a positive edge response 0 = edge 2 is programmed for a negative edge response downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 283 dspic33evxxxgm00x/10x family bit 5-2 edg2sel<3:0>: edge 2 source select bits 1111 = f osc 1110 = osci pin 1101 = frc oscillator 1100 = bfrc oscillator 1011 = internal lprc oscillator 1010 = reserved 1001 = reserved 1000 = reserved 0111 = reserved 0110 = reserved 0101 = reserved 0100 = cmp1 module 0011 = cted2 pin 0010 = cted1 pin 0001 = ocmp1 module 0000 = ic1 module bit 1-0 unimplemented: read as 0 register 23-2: ctmucon2: ctmu control register 2 (continued) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 284 ? 2013-2015 microchip technology inc. register 23-3: ctmuicon: ctmu current control register ( 3 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 itrim5 itrim4 itrim3 itrim2 itrim1 itrim0 irng1 ( 2 ) irng0 ( 2 ) bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-10 itrim<5:0>: current source trim bits 011111 = maximum positive change from nominal current + 62% 011110 = maximum positive change from nominal current + 60% 000010 = minimum positive change from nominal current + 4% 000001 = minimum positive change from nominal current + 2% 000000 = nominal current output specified by irng<1:0> 111111 = minimum negative change from nominal current C 2% 111110 = minimum negative change from nominal current C 4% 100010 = maximum negative change from nominal current C 60% 100001 = maximum negative change from nominal current C 62% bit 9-8 irng<1:0>: current source range select bits ( 2 ) 11 = 100 ? base current 10 = 10 ? base current 01 = base current level 00 = 1000 ? base current ( 1 ) bit 7-0 unimplemented: read as 0 note 1: this current range is not available for use with the internal temperature measurement diode. 2: refer to the ctmu current source specifications ( table 30-52 ) in section 30.0 electrical characteristics for the current range selection values. 3: current sources are not generated when 12-bit adc mo de is chosen. current sources are active only when 10-bit adc mode is chosen. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 285 dspic33evxxxgm00x/10x family 24.0 10-bit/12-bit analog-to-digital converter (adc) the analog-to-digital (adc) module in the dspic33evxxxgm00x/10x family devices supports up to 36 analog input channels. the adc module can be configured by the user as either a 10-bit, 4 sample-and-hold (s&h) adc (default configuration) or a 12-bit, 1 s&h adc. 24.1 key features 24.1.1 10-bit adc configuration the 10-bit adc configuration has the following key features: successive approximation (sar) conversion conversion speeds of up to 1.1 msps up to 36 analog input pins connections to four internal op amps connections to the charge time measurement unit (ctmu) and temperature measurement diode simultaneous sampling of: - up to four analog input pins - four op amp outputs combinations of analog inputs and op amp outputs automatic channel scan mode selectable conversion trigger source selectable buffer fill modes four result alignment options (signed/unsigned, fractional/integer) operation during cpu sleep and idle modes 24.1.2 12-bit adc configuration the 12-bit adc configuration supports all the features listed previously, with the exception of the following: in the 12-bit configuration, conversion speeds of up to 500 ksps are supported there is only one s&h amplifier in the 12-bit configuration. therefore, simultaneous sampling of multiple channels is not supported. the adc has up to 36 analog inputs. the analog inputs, an32 through an63, are multiplexed, thus providing flexibility in using any of these analog inputs in addition to the analog inputs, an0 through an31. since an32 through an63 are multiplexed, do not use two channels simultaneously, since it may result in erroneous output from the module. these analog inputs are shared with op amp inputs and outputs, com- parator inputs and external voltage references. when op amp/comparator functionality is enabled, the analog input that shares that pin is no longer available. the actual number of analog input pins and op amps depends on the specific device. a block diagram of the adc module with connection options is shown in figure 24-1 . figure 24-2 shows a block diagram of the adc conversion clock period. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to analog-to-digital converter (adc) (ds70621) in the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: the adc module needs to be disabled before modifying the ad12b bit. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 286 ? 2013-2015 microchip technology inc. figure 24-1: adcx module block diagram with connection op tions for anx pins and op amps +C cmp1 /oa1 v refl v refl v refl + C ch0 0 1 v refl an0-an31 oa1-oa3, oa5 ch0sx ch0nx ch123nx 000000 111111 a b 1 0 ch0sa<5:0> (1) ch0sb<5:0> (1) ch0sx ch0nx ch0na (1) ch0nb (1) cscna ch123sx ch123nx ch123sa<2:0> ch123sb<2:0> ch123na<1:0> ch123nb<1:0> s&h1 alternate input selection channel scan this diagram depicts all of the available adc connection options to the four s&h amplifiers, which are designated: ch0, ch1, ch2 and ch3. the anx analog pins or op amp outputs are connected to the ch0-ch3 amplifiers through the multiplexers, controlled by the sfr control bits, ch0sx, ch0nx, ch123sx and ch123nx. ab ab ab + C ch1 + C ch2 + C ch3 ch123sx +C oa2 ch123sx 0x10 11 ch123nx 0x10 11 ch123nx +C oa3 ch123sx an0/oa2out/ra0 pgec1/an4/c1in1+/rpi34/rb2 pged1/an5/c1in1-/rp35/rb3 pgec3/an3/oa1out/rpi33/cted1/rb1 an9/rpi27/ra11 an1/c2in1+/ra1 an10/rpi28/ra12 pged3/an2/c2in1-/ss1 /rpi32/cted2/rb0 an8/c3in1+/u1rts /bclk1/rc2 an6/oa3out/c4in1+/rc0 an7/c3in1-/c4in1-/rc1 an11/c1in2-/u1cts /rc11 +C oa1 av ss adc1buf0 (2,3) adc1buf1 (3) adc1buf2 (3) adc1buff (3) adc1bufe (3) from ctmu current source (ctmui) s&h2 s&h3 s&h0 note 1: channels 1, 2 and 3 are not applicable for the 12-bit mode of operation. 2: when addmaen (adxcon4<8>) = 0 , adc1buf0-adc1buff are used. 3: when addmaen (adxcon4<8>) = 1 enabling dma, only adc1buf0 is used. alts (mux a/mux b) oa5 oa5in+/an24/c5in3-/c5in1+/sdo1/rp20/t1ck/ra4 oa5in-/an27/c5in1-/rp41/rb9 oa5out/an25/c5in4-/rp39/int0/rb7 sar adc v refh v refl av dd 000001 010 011 1xx 0x10 11 000001 010 011 1xx 000001 010 011 1xx +C 100000111111 an32-an63 (an61-band gap voltage an62-ctmu temp diode an63-not connected) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 287 dspic33evxxxgm00x/10x family figure 24-2: adcx conversion clock period block diagram 10 adc conversion clock multiplier 1, 2, 3, 4, 5,..., 256 adxcon3<15> t p (1) t ad 6 adxcon3<7:0> note 1: t p = 1/f p . 2: refer to the adc electrical specifications in section 30.0 electrical characteristics for the exact rc clock value. adc internal rc clock (2) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 288 ? 2013-2015 microchip technology inc. 24.2 adc helpful tips 1. the smpix control bits in the adxcon2 registers: a) determine when the adc interrupt flag is set and an interrupt is generated, if enabled. b) when the cscna bit in the adxcon2 reg- ister is set to 1 , this determines when the adc analog scan channel list, defined in the adxcssl/adxcssh registers, starts over from the beginning. c) when the dma peripheral is not used (addmaen = 0 ), this determines when the adc result buffer pointer to adc1buf0-adc1buff gets reset back to the beginning at adc1buf0. d) when the dma peripheral is used (addmaen = 1 ), this determines when the dma address pointer is incremented after a sample/conversion operation. adc1buf0 is the only adc buffer used in this mode. the adc result buffer pointer to adc1buf0- adc1buff gets reset back to the beginning at adc1buf0. the dma address is incremented after completion of every 32nd sample/conversion operation. conversion results are stored in the adc1buf0 register for transfer to ram using the dma peripheral. 2. when the dma module is disabled (addmaen = 0 ), the adc has 16 result buffers. adc conversion results are stored sequentially in adc1buf0-adc1buff, regardless of which analog inputs are being used subject to the smpix bits and the condition described in 1.c) above. there is no relationship between the anx input being measured and which adc buffer (adc1buf0-adc1buff) that the conversion results will be placed in. 3. when the dma module is enabled (addmaen = 1 ), the adc module has only 1 adc result buffer (i.e., adcxbuf0) per adc peripheral and the adc conversion result must be read, either by the cpu or dma controller, before the next adc conversion is complete to avoid overwriting the previous value. 4. the done bit (adxcon1<0>) is only cleared at the start of each conversion and is set at the completion of the conversion, but remains set indefinitely, even through the next sample phase until the next conversion begins. if application code is monitoring the done bit in any kind of software loop, the user must consider this behavior because the cpu code execution is faster than the adc. as a result, in manual sample mode, particularly where the users code is setting the samp bit (adxcon1<1>), the done bit should also be cleared by the user application just before setting the samp bit. 5. enabling op amps, comparator inputs and exter- nal voltage references can limit the availability of analog inputs (anx pins). for example, when op amp 2 is enabled, the pins for an0, an1 and an2 are used by the op amps inputs and output. this negates the usefulness of alternate input mode since the mux a selections use an0-an2. carefully study the adc block diagram to determine the configuration that will best suit your application. for configuration examples, refer to analog-to-digital converter (adc) (ds70621) in the dspic33/pic24 family reference manual . downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 289 dspic33evxxxgm00x/10x family 24.3 adc control registers register 24-1: adxcon1: adcx control register 1 r/w-0 u-0 r/w-0 r/w-0 u-0 r/w-0 r/w-0 r/w-0 adon adsidl addmabm ad12b form1 form0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0, hc, hs r/c-0, hc, hs ssrc2 ssrc1 ssrc0 ssrcg simsam asam samp done ( 1 ) bit 7 bit 0 legend: c = clearable bit u = unimplemented bit, read as 0 r = readable bit w = writable bit hs = hardware settable bit hc = hardware clearable bit -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 adon: adcx operating mode bit 1 = adcx module is operating 0 = adcx is off bit 14 unimplemented: read as 0 bit 13 adsidl: adcx stop in idle mode bit 1 = discontinues module operation when the device enters idle mode 0 = continues module operation in idle mode bit 12 addmabm: adcx dma buffer build mode bit 1 = dma buffers are written in the order of conversion; the module provides an address to the dma channel that is the same as the address used for the non-dma stand-alone buffer 0 = dma buffers are written in scatter/gather mode; the module provides a scatter/gather mode address to the dma channel based on the index of the analog input and the size of the dma buffer bit 11 unimplemented: read as 0 bit 10 ad12b: adcx 10-bit or 12-bit operation mode bit 1 = 12-bit, 1-channel adc operation 0 = 10-bit, 4-channel adc operation bit 9-8 form<1:0>: data output format bits for 10-bit operation: 11 = signed fractional (d out = sddd dddd dd00 0000 , where s = .not.d<9>) 10 = fractional (d out = dddd dddd dd00 0000 ) 01 = signed integer (d out = ssss sssd dddd dddd , where s = .not.d<9>) 00 = integer (d out = 0000 00dd dddd dddd ) for 12-bit operation: 11 = signed fractional (d out = sddd dddd dddd 0000 , where s = .not.d<11>) 10 = fractional (d out = dddd dddd dddd 0000 ) 01 = signed integer (d out = ssss sddd dddd dddd , where s = .not.d<11>) 00 = integer (d out = 0000 dddd dddd dddd ) note 1: do not clear the done bit in software if auto-sample is enabled (asam = 1 ). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 290 ? 2013-2015 microchip technology inc. bit 7-5 ssrc<2:0>: sample clock source select bits if ssrcg = 1 : 111 = reserved 110 = reserved 101 = reserved 100 = reserved 011 = reserved 010 = pwm generator 3 primary trigger compare ends sampling and starts conversion 001 = pwm generator 2 primary trigger compare ends sampling and starts conversion 000 = pwm generator 1 primary trigger compare ends sampling and starts conversion if ssrcg = 0 : 111 = internal counter ends sampling and starts conversion (auto-convert) 110 = ctmu ends sampling and starts conversion 101 = reserved 100 = timer5 compare ends sampling and starts conversion 011 = pwm primary special event trigger ends sampling and starts conversion 010 = timer3 compare ends sampling and starts conversion 001 = active transition on the int0 pin ends sampling and starts conversion 000 = clearing the sample bit (samp) ends sampling and starts conversion (manual mode) bit 4 ssrcg: sample trigger source group bit see ssrc<2:0> for details. bit 3 simsam: simultaneous sample select bit (only applicable when chps<1:0> = 01 or 1x ) in 12-bit mode (ad12b = 1 ), simsam is unimplemented and is read as 0 : 1 = samples ch0, ch1, ch2, ch3 simultaneously (when chps<1:0> = 1x ) or samples ch0 and ch1 simultaneously (when chps<1:0> = 01 ) 0 = samples multiple channels individually in sequence bit 2 asam: adcx sample auto-start bit 1 = sampling begins immediately after last conversion; samp bit is auto-set 0 = sampling begins when samp bit is set bit 1 samp: adcx sample enable bit 1 = adcx sample-and-hold amplifiers are sampling 0 = adcx sample-and-hold amplifiers are holding if asam = 0 , software can write 1 to begin sampling. automatically set by hardware if asam = 1 . if ssrc<2:0> = 000 , software can write 0 to end sampling and start conversion. if ssrc<2:0> ?? 000 , automatically cleared by hardware to end sampling and start conversion. bit 0 done: adcx conversion status bit ( 1 ) 1 = adcx conversion cycle is completed. 0 = adcx conversion has not started or is in progress automatically set by hardware when conversion is complete. software can write 0 to clear done bit status (software not allowed to write 1 ). clearing this bit does not affect any operation in progress. automatically cleared by hardware at the start of a new conversion. register 24-1: adxcon1: adcx control register 1 (continued) note 1: do not clear the done bit in software if auto-sample is enabled (asam = 1 ). downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 291 dspic33evxxxgm00x/10x family register 24-2: adxcon2: adcx control register 2 r/w-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 vcfg2 ( 1 ) vcfg1 ( 1 ) vcfg0 ( 1 ) cscna chps1 chps0 bit 15 bit 8 r-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 bufs smpi4 smpi3 smpi2 smpi1 smpi0 bufm alts bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 vcfg<2:0>: converter voltage reference configuration bits ( 1 ) bit 12-11 unimplemented: read as 0 bit 10 cscna: input scan select bit 1 = scans inputs for ch0+ during sample mux a 0 = does not scan inputs bit 9-8 chps<1:0>: channel select bits in 12-bit mode (ad21b = 1 ), chps<1:0> bits are unimplemented and are read as 0 : 1x = converts ch0, ch1, ch2 and ch3 01 = converts ch0 and ch1 00 = converts ch0 bit 7 bufs: buffer fill status bit (only valid when bufm = 1 ) 1 = adcx is currently filling the second half of the buffer; the user application should access data in the first half of the buffer 0 = adcx is currently filling the first half of the buffer; the user application should access data in the second half of the buffer bit 6-2 smpi<4:0>: increment rate bits when addmaen = 0 : x1111 = generates interrupt after completion of every 16th sample/conversion operation x1110 = generates interrupt after completion of every 15th sample/conversion operation x0001 = generates interrupt after completion of every 2nd sample/conversion operation x0000 = generates interrupt after completion of every sample/conversion operation when addmaen = 1 : 11111 = increments the dma address after completion of every 32nd sample/conversion operation 11110 = increments the dma address after completion of every 31st sample/conversion operation 00001 = increments the dma address after completion of every 2nd sample/conversion operation 00000 = increments the dma address after completion of every sample/conversion operation note 1: the adcx v refh input is connected to av dd and the v refl input is connected to av ss . value v refh v refl xxx av dd av ss downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 292 ? 2013-2015 microchip technology inc. bit 1 bufm: buffer fill mode select bit 1 = starts buffer filling the first half of the buffer on the first interrupt and the second half of the buffer on the next interrupt 0 = always starts filling the buffer from the start address bit 0 alts: alternate input sample mode select bit 1 = uses channel input selects for sample mux a on the first sample and sample mux b on the next sample 0 = always uses channel input selects for sample mux a register 24-2: adxcon2: adcx control register 2 (continued) note 1: the adcx v refh input is connected to av dd and the v refl input is connected to av ss . downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 293 dspic33evxxxgm00x/10x family register 24-3: adxcon3: adcx control register 3 r/w-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 adrc samc4 ( 1 ) samc3 ( 1 ) samc2 ( 1 ) samc1 ( 1 ) samc0 ( 1 ) bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 adcs7 ( 2 ) adcs6 ( 2 ) adcs5 ( 2 ) adcs4 ( 2 ) adcs3 ( 2 ) adcs2 ( 2 ) adcs1 ( 2 ) adcs0 ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 adrc: adcx conversion clock source bit 1 = adcx internal rc clock 0 = clock derived from system clock bit 14-13 unimplemented: read as 0 bit 12-8 samc<4:0>: auto-sample time bits ( 1 ) 11111 = 31 t ad 00001 = 1 t ad 00000 = 0 t ad bit 7-0 adcs<7:0>: adcx conversion clock select bits ( 2 ) 11111111 = t p (adcs<7:0> + 1) = t p 256 = t ad 00000010 = t p (adcs<7:0> + 1) = t p 3 = t ad 00000001 = t p (adcs<7:0> + 1) = t p 2 = t ad 00000000 = t p (adcs<7:0> + 1) = t p 1 = t ad note 1: these bits are only used if ssrc<2:0> (adxcon1<7:5>) = 111 and ssrcg (adxcon1<4>) = 0 . 2: these bits are not used if adrc (adxcon3<15>) = 1 . downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 294 ? 2013-2015 microchip technology inc. register 24-4: adxcon4: adcx control register 4 u-0 u-0 u-0 u-0 u-0 u-0 u-0 r/w-0 addmaen bit 15 bit 8 u-0 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 dmabl2 dmabl1 dmabl0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-9 unimplemented: read as 0 bit 8 addmaen: adcx dma enable bit 1 = conversion results are stored in the adc1buf0 register for transfer to ram using dma 0 = conversion results are stored in the adc1buf0 through adc1buff registers; dma will not be used bit 7-3 unimplemented: read as 0 bit 2-0 dmabl<2:0>: selects number of dma buffer locations per analog input bits 111 = allocates 128 words of buffer to each analog input 110 = allocates 64 words of buffer to each analog input 101 = allocates 32 words of buffer to each analog input 100 = allocates 16 words of buffer to each analog input 011 = allocates 8 words of buffer to each analog input 010 = allocates 4 words of buffer to each analog input 001 = allocates 2 words of buffer to each analog input 000 = allocates 1 word of buffer to each analog input downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 295 dspic33evxxxgm00x/10x family register 24-5: adxchs123: adcx input channels 1, 2, 3 select register u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ch123sb2 ch123sb1 ch123nb1 ch123nb0 ch123sb0 bit 15 bit 8 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ch123sa2 ch123sa1 ch123na1 ch123na0 ch123sa0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-13 unimplemented: read as 0 bit 12-11 ch123sb<2:1>: channels 1, 2, 3 positive input select for sample b bits 1xx = ch1 positive input is an0 (op amp 2), ch2 positive input is an25 (op amp 5), ch3 positive input is an6 (op amp 3) 011 = ch1 positive input is an3 (op amp 1), ch2 positive input is an0 (op amp 2), ch3 positive in put is an25 (op amp 5) 010 = ch1 positive input is an3 (op amp 1), ch2 positive input is an0 (op amp 2), ch3 positive in put is an6 (op amp 3) 001 = ch1 positive input is an3, ch2 positive input is an4, ch3 positive input is an5 000 = ch1 positive input is an0, ch2 positive input is an1, ch3 positive input is an2 bit 10-9 ch123nb<1:0>: channels 1, 2, 3 negative input select for sample b bits 11 = ch1 negative input is an9, ch2 negative input is an10, ch3 negative input is an11 10 = ch1 negative input is an6, ch2 negative input is an7, ch3 negative input is an8 0x = ch1, ch2, ch3 negative inputs are v refl bit 8 ch123sb0: channels 1, 2, 3 positive input select for sample b bit see bits<12:11> for bit selections. bit 7-5 unimplemented: read as 0 bit 4-3 ch123sa<2:1>: channels 1, 2, 3 positive input select for sample a bits 1xx = ch1 positive input is an0 (op amp 2), ch2 positive input is an25 (op amp 5), ch3 positive input is an6 (op amp 3) 011 = ch1 positive input is an3 (op amp 1), ch2 positive input is an0 (op amp 2), ch3 positive in put is an25 (op amp 5) 010 = ch1 positive input is an3 (op amp 1), ch2 positive input is an0 (op amp 2), ch3 positive in put is an6 (op amp 3) 001 = ch1 positive input is an3, ch2 positive input is an4, ch3 positive input is an5 000 = ch1 positive input is an0, ch2 positive input is an1, ch3 positive input is an2 bit 2-1 ch123na<1:0>: channels 1, 2, 3 negative input select for sample a bits 11 = ch1 negative input is an9, ch2 negative input is an10, ch3 negative input is an11 10 = ch1 negative input is an6, ch2 negative input is an7, ch3 negative input is an8 0x = ch1, ch2, ch3 negative inputs are v refl bit 0 ch123sa0: channels 1, 2, 3 positive input select for sample a bit see bits<4:3> for bit selections. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 296 ? 2013-2015 microchip technology inc. register 24-6: adxchs0: adcx input channel 0 select register r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ch0nb ch0sb5 ( 1 , 3 ) ch0sb4 ( 1 , 3 ) ch0sb3 ( 1 , 3 ) ch0sb2 ( 1 , 3 ) ch0sb1 ( 1 , 3 ) ch0sb0 ( 1 , 3 ) bit 15 bit 8 r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ch0na ch0sa5 ( 1 , 3 ) ch0sa4 ( 1 , 3 ) ch0sa3 ( 1 , 3 ) ch0sa2 ( 1 , 3 ) ch0sa1 ( 1 , 3 ) ch0sa0 ( 1 , 3 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 ch0nb: channel 0 negative input select for sample mux b bit 1 = channel 0 negative input is an1 ( 1 ) 0 = channel 0 negative input is v refl bit 14 unimplemented: read as 0 bit 13-8 ch0sb<5:0>: channel 0 positive input select for sample mux b bits ( 1 , 3 ) 111111 = channel 0 positive input is an63 111110 = channel 0 positive input is an62 111101 = channel 0 positive input is an61 (internal band gap voltage) 011111 = channel 0 positive input is an31 011110 = channel 0 positive input is an30 000001 = channel 0 positive input is an1 000000 = channel 0 positive input is an0 (op amp 2) ( 2 ) bit 7 ch0na: channel 0 negative input select for sample mux a bit 1 = channel 0 negative input is an1 ( 1 ) 0 = channel 0 negative input is v refl bit 6 unimplemented: read as 0 note 1: an0 to an7 are repurposed when comparator and op amp functionality are enabled. see figure 24-1 to determine how enabling a particular op amp or comparator affects selection choices for channels 1, 2 and 3. 2: if the op amp is selected (opaen bit (cmxcon<10>) = 1 ), the oax input is used; otherwise, the anx input is used. 3: see the pin diagrams section for the available analog channels for each device. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 297 dspic33evxxxgm00x/10x family bit 5-0 ch0sa<5:0>: channel 0 positive input select for sample mux a bits ( 1 , 3 ) 111111 = channel 0 positive input is an63 (unconnected) 111110 = channel 0 positive input is an62 (ctmu temperature diode) 111101 = channel 0 positive input is an61 (internal band gap voltage) 011111 = channel 0 positive input is an31 011110 = channel 0 positive input is an30 000001 = channel 0 positive input is an1 000000 = channel 0 positive input is an0 (op amp 2) ( 2 ) register 24-6: adxchs0: adcx input channel 0 select register (continued) note 1: an0 to an7 are repurposed when comparator and op amp functionality are enabled. see figure 24-1 to determine how enabling a particular op amp or comparator affects selection choices for channels 1, 2 and 3. 2: if the op amp is selected (opaen bit (cmxcon<10>) = 1 ), the oax input is used; otherwise, the anx input is used. 3: see the pin diagrams section for the available analog channels for each device. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 298 ? 2013-2015 microchip technology inc. register 24-7: adxcssh: adcx input scan select register high ( 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 css31 css30 css29 css28 css27 css26 ( 1 ) css25 ( 1 ) css24 ( 1 ) bit 15 bit 8 u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 css19 css18 css17 css16 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 css31: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 14 css30: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 13 css29: adcx input scan selection bits 1 = selects anx for input scan 0 = skips anx for input scan bit 12 css28: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 11 css27: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 10 css26: adcx input scan selection bit ( 1 ) 1 = selects oa3/an6 for input scan 0 = skips oa3/an6 for input scan bit 9 css25: adcx input scan selection bit ( 1 ) 1 = selects oa2/an0 for input scan 0 = skips oa2/an0 for input scan bit 8 css24: adcx input scan selection bit ( 1 ) 1 = selects oa1/an3 for input scan 0 = skips oa1/an3 for input scan bit 7-4 unimplemented: read as 0 bit 3 css19: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 2 css18: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan note 1: if the op amp is selected (opaen bit (cmxcon<10>) = 1 ), the oax input is used; otherwise, the anx input is used. 2: all bits in this register can be selected by the user application. however, inputs selected for sc an without a corresponding input on the device convert v refl . downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 299 dspic33evxxxgm00x/10x family bit 1 css17: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan bit 0 css16: adcx input scan selection bit 1 = selects anx for input scan 0 = skips anx for input scan register 24-7: adxcssh: adcx input scan select register high ( 2 ) (continued) note 1: if the op amp is selected (opaen bit (cmxcon<10>) = 1 ), the oax input is used; otherwise, the anx input is used. 2: all bits in this register can be selected by the user application. however, inputs selected for sc an without a corresponding input on the device convert v refl . downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 300 ? 2013-2015 microchip technology inc. register 24-8: adxcssl: adcx input scan select register low ( 1 , 2 ) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 css<15:8> bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 css<7:0> bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-0 css<15:0>: adcx input scan selection bits 1 = selects anx for input scan 0 = skips anx for input scan note 1: on devices with less than 16 analog inputs, all bits in this register can be selected by the user applic ation. however, inputs selected for scan without a corresponding input on the device convert v refl . 2: cssx = anx, where x = 0-5. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 301 dspic33evxxxgm00x/10x family 25.0 op amp/comparator module the dspic33evxxxgm00x/10x family devices contain up to five comparators that can be configured in various ways. cmp1, cmp2, cmp3 and cmp5 also have the option to be configured as op amps, with the output being brought to an external pin for gain/filtering connec- tions. as shown in figure 25-1 , individual comparator options are specified by the comparator modules special function register (sfr) control bits. the following options allow users to: select the edge for trigger and interrupt generation configure the comparator voltage reference configure output blanking and masking configure as a comparator or op amp (cmp1, cmp2, cmp3 and cmp5 only) figure 25-1: op amp/comparat or x module block diagram note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to op amp/comparator (ds70000357) in the dspic33/pic24 family reference manual , which is avail- able from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. note: not all op amp/comparator input/output connections are available on all devices. see the pin diagrams section for available connections. blanking function digital filter cxout (1) (see figure 25-2 ) (see figure 25-3 ) cmp4 blanking function digital filter (see figure 25-2 ) (see figure 25-3 ) C+ v in + c4out (1) trigger output 01 0010 op amp/comparator 1, 2, 3, 5 comparator 4 c4in1+ cv refin v in - 01 11 00 cch<1:0> (cm4con<1:0>) oa3/an6/c4in4- c4in1- cref (cmxcon<4>) 01 10 oa1/an3/c4in2- oa2/an0/c4in3- (x = 1, 2, 3, 5) cxin1+ cv refin cxin1- c x in3- cmpx C+ v in - v in + cch<1:0> (cmxcon<1:0>) cref (cmxcon<4>) op amp/comparator op amp x C+ oax oaxout opaen (cmxcon<10>) (to adc) 01 cxin2- 11 c x in4- note 1: the cxout pin is not a dedicated output pin on the device. this must be mapped to a physical pin using peripheral pin select (pps). refer to section 11.0 i/o ports for more information. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 302 ? 2013-2015 microchip technology inc. figure 25-2 , shows the user-programmable blanking function block diagram. figure 25-2: user-programmable blanking function block diagram figure 25-3 , shows the digital filter interconnect block diagram. figure 25-3: digital filter interconnect block diagram selsrca<3:0> selsrcb<3:0> selsrcc<3:0> and cmxmskcon mux a mai mbi mci comparator output to d i g i t a l signals filter or blanking blanking blanking signals signals andi mask and-or function hlms mux b mux c blanking logic (cmxmskcon<15>) (cmxmsksrc<11:8>) (cmxmsksrc<7:4>) (cmxmsksrc<3:0>) mbi mci mai mbi mci mai cxout cfltren digital filter tx timer match (1,2) synco1 (3) f p (4) f osc (4) cfsel<2:0> ?? cfdiv note 1: see the type c timer block diagram ( figure 13-2 ). 2: see the type b timer block diagram ( figure 13-1 ). 3: see the pwmx module register interconnect diagram ( figure 17-2 ). 4: see the oscillator system diagram ( figure 9-1 ). from blanking logic 1xx010 000 001 1 0 (cmxfltr<6:4>) (cmxfltr<3>) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 303 dspic33evxxxgm00x/10x family 25.1 op amp/comparator control registers register 25-1: cmstat: op amp/comparator status register r/w-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 psidl c 5 e v t ( 1 ) c4evt ( 1 ) c3evt ( 1 ) c2evt ( 1 ) c1evt ( 1 ) bit 15 bit 8 u-0 u-0 u-0 r-0 r-0 r-0 r-0 r-0 c 5 o u t ( 2 ) c4out ( 2 ) c3out ( 2 ) c2out ( 2 ) c1out ( 2 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 psidl: op amp/comparator stop in idle mode bit 1 = discontinues operation of all op amps/comparators when device enters idle mode 0 = continues operation of all op amps/comparators in idle mode bit 14-13 unimplemented: read as 0 bit 12-8 c5evt:c1evt: op amp/comparator 1-5 event status bits ( 1 ) 1 = op amp/comparator event occurred 0 = op amp/comparator event did not occur bit 7-5 unimplemented: read as 0 bit 4-0 c5out:c1out: op amp/comparator 1-5 output status bits ( 2 ) when cpol = 0 : 1 = v in + > v in - 0 = v in + < v in - when cpol = 1 : 1 = v in + < v in - 0 = v in + > v in - note 1: reflects the value of the of the cevt bit in the respective op amp/comparator control register, cmxcon<9>. 2: reflects the value of the cout bit in the respective op amp/comparator control register, cmxcon<8 >. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 304 ? 2013-2015 microchip technology inc. register 25-2: cmxcon: comparator x control register (x = 1, 2, 3 or 5) r/w-0 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 r-0 con coe cpol opaen cevt cout bit 15 bit 8 r/w-0 r/w-0 u-0 r/w-0 u-0 u-0 r/w-0 r/w-0 evpol1 evpol0 c r e f ( 1 ) cch1 ( 1 ) cch0 ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 con: op amp/comparator x enable bit 1 = op amp/comparator x is enabled 0 = op amp/comparator x is disabled bit 14 coe: comparator x output enable bit 1 = comparator output is present on the cxout pin 0 = comparator output is internal only bit 13 cpol: comparator x output polarity select bit 1 = comparator output is inverted 0 = comparator output is not inverted bit 12-11 unimplemented: read as 0 bit 10 opaen: op amp x enable bit 1 = op amp is enabled 0 = op amp is disabled bit 9 cevt: comparator x event bit 1 = comparator event, according to evpol<1:0> settings, occurred; disables future triggers and interrupts until the bit is cleared 0 = comparator event did not occur bit 8 cout: comparator x output bit when cpol = 0 (non-inverted polarity): 1 = v in + > v in - 0 = v in + < v in - when cpol = 1 (inverted polarity): 1 = v in + < v in - 0 = v in + > v in - note 1: inputs that are selected and not available will be tied to v ss . see the pin diagrams section for available inputs for each package. 2: this input is not available when opaen (cmxcon<10>) = 1 . downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 305 dspic33evxxxgm00x/10x family bit 7-6 evpol<1:0>: trigger/event/interrupt polarity select bits 11 = trigger/event/interrupt generated on any change of the comparator output (while cevt = 0 ) 10 = trigger/event/interrupt generated only on high-to-l ow transition of the polarity selected comparator output (while cevt = 0 ) if cpol = 1 (inverted polarity): low-to-high transition of the comparator output. if cpol = 0 (non-inverted polarity): high-to-low transition of the comparator output. 01 = trigger/event/interrupt generated only on low-to-h igh transition of the polarity selected comparator output (while cevt = 0 ) if cpol = 1 (inverted polarity): high-to-low transition of the comparator output. if cpol = 0 (non-inverted polarity): low-to-high transition of the comparator output. 00 = trigger/event/interrupt generation is disabled bit 5 unimplemented: read as 0 bit 4 cref: comparator x reference select bit (v in + input) ( 1 ) 1 = v in + input connects to the internal cv refin voltage 0 = v in + input connects to the cxin1+ pin bit 3-2 unimplemented: read as 0 bit 1-0 cch<1:0>: op amp/comparator x channel select bits ( 1 ) 11 = inverting input of op amp/comparator connects to the cxin4- pin ( 2 ) 10 = inverting input of op amp/comparator connects to the cxin3- pin ( 2 ) 01 = inverting input of op amp/comparator connects to the cxin2- pin ( 2 ) 00 = inverting input of op amp/comparator connects to the cxin1- pin register 25-2: cmxcon: comparator x control register (x = 1, 2, 3 or 5) (continued) note 1: inputs that are selected and not available will be tied to v ss . see the pin diagrams section for available inputs for each package. 2: this input is not available when opaen (cmxcon<10>) = 1 . downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 306 ? 2013-2015 microchip technology inc. register 25-3: cm4con: comp arator 4 control register r/w-0 r/w-0 r/w-0 u-0 u-0 u-0 r/w-0 r-0 con coe cpol c e v tc o u t bit 15 bit 8 r/w-0 r/w-0 u-0 r/w-0 u-0 u-0 r/w-0 r/w-0 evpol1 evpol0 c r e f ( 1 ) cch1 ( 1 ) cch0 ( 1 ) bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 con: op amp/comparator 4 enable bit 1 = comparator is enabled 0 = comparator is disabled bit 14 coe: comparator 4 output enable bit 1 = comparator output is present on the c4out pin 0 = comparator output is internal only bit 13 cpol: comparator 4 output polarity select bit 1 = comparator output is inverted 0 = comparator output is not inverted bit 12-10 unimplemented: read as 0 bit 9 cevt: comparator 4 event bit 1 = comparator event, according to evpol<1:0> settings, occurred; disables future triggers and interrupts until the bit is cleared 0 = comparator event did not occur bit 8 cout: comparator 4 output bit when cpol = 0 (non-inverted polarity): 1 = v in + > v in - 0 = v in + < v in - when cpol = 1 (inverted polarity): 1 = v in + < v in - 0 = v in + > v in - bit 7-6 evpol<1:0>: trigger/event/interrupt polarity select bits 11 = trigger/event/interrupt generated on any change of the comparator output (while cevt = 0 ) 10 = trigger/event/interrupt generated only on high-to-low transition of the polarity selected comparator output (while cevt = 0 ) if cpol = 1 (inverted polarity): low-to-high transition of the comparator output. if cpol = 0 (non-inverted polarity): high-to-low transition of the comparator output. 01 = trigger/event/interrupt generated only on low-to-hi gh transition of the polarity selected comparator output (while cevt = 0 ) if cpol = 1 (inverted polarity): high-to-low transition of the comparator output. if cpol = 0 (non-inverted polarity): low-to-high transition of the comparator output. 00 = trigger/event/interrupt generation is disabled note 1: inputs that are selected and not available will be tied to v ss . see the pin diagrams section for available inputs for each package. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 307 dspic33evxxxgm00x/10x family bit 5 unimplemented: read as 0 bit 4 cref: comparator 4 reference select bit (v in + input) ( 1 ) 1 = v in + input connects to the internal cv refin voltage 0 = v in + input connects to the c4in1+ pin bit 3-2 unimplemented: read as 0 bit 1-0 cch<1:0>: comparator 4 channel select bits ( 1 ) 11 = v in - input of comparator connects to the c4in4- pin 10 = v in - input of comparator connects to the c4in3- pin 01 = v in - input of comparator connects to the c4in2- pin 00 = v in - input of comparator connects to the c4in1- pin register 25-3: cm4con: comparator 4 control register (continued) note 1: inputs that are selected and not available will be tied to v ss . see the pin diagrams section for available inputs for each package. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 308 ? 2013-2015 microchip technology inc. register 25-4: cmxmsksrc: comparator x mask source select control register u-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 rw-0 selsrcc3 selsrcc2 selsrcc1 selsrcc0 bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 selsrcb3 selsrcb2 selsrcb1 selsrcb0 selsrca3 selsrca2 selsrca1 selsrca0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-12 unimplemented: read as 0 bit 11-8 selsrcc<3:0>: mask c input select bits 1111 = flt4 1110 = flt2 1101 = reserved 1100 = reserved 1011 = reserved 1010 = reserved 1001 = reserved 1000 = reserved 0111 = reserved 0110 = reserved 0101 = pwm3h 0100 = pwm3l 0011 = pwm2h 0010 = pwm2l 0001 = pwm1h 0000 = pwm1l bit 7-4 selsrcb<3:0>: mask b input select bits 1111 = flt4 1110 = flt2 1101 = reserved 1100 = reserved 1011 = reserved 1010 = reserved 1001 = reserved 1000 = reserved 0111 = reserved 0110 = reserved 0101 = pwm3h 0100 = pwm3l 0011 = pwm2h 0010 = pwm2l 0001 = pwm1h 0000 = pwm1l downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 309 dspic33evxxxgm00x/10x family bit 3-0 selsrca<3:0>: mask a input select bits 1111 = flt4 1110 = flt2 1101 = reserved 1100 = reserved 1011 = reserved 1010 = reserved 1001 = reserved 1000 = reserved 0111 = reserved 0110 = reserved 0101 = pwm3h 0100 = pwm3l 0011 = pwm2h 0010 = pwm2l 0001 = pwm1h 0000 = pwm1l register 25-4: cmxmsksrc: comparator x mask source select control register (continued) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 310 ? 2013-2015 microchip technology inc. register 25-5: cmxmskcon: comparator x mask gating control register r/w-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 hlms ocen ocnen oben obnen oaen oanen bit 15 bit 8 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 nags pags acen acnen aben abnen aaen aanen bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 hlms: high or low-level masking select bit 1 = the masking (blanking) function will prevent any asserted ( 0 ) comparator signal from propagating 0 = the masking (blanking) function will prevent any asserted ( 1 ) comparator signal from propagating bit 14 unimplemented: read as 0 bit 13 ocen: or gate c input enable bit 1 = mci is connected to or gate 0 = mci is not connected to or gate bit 12 ocnen: or gate c input inverted enable bit 1 = inverted mci is connected to or gate 0 = inverted mci is not connected to or gate bit 11 oben: or gate b input enable bit 1 = mbi is connected to or gate 0 = mbi is not connected to or gate bit 10 obnen: or gate b input inverted enable bit 1 = inverted mbi is connected to or gate 0 = inverted mbi is not connected to or gate bit 9 oaen: or gate a input enable bit 1 = mai is connected to or gate 0 = mai is not connected to or gate bit 8 oanen: or gate a input inverted enable bit 1 = inverted mai is connected to or gate 0 = inverted mai is not connected to or gate bit 7 nags: and gate output inverted enable bit 1 = inverted andi is connected to or gate 0 = inverted andi is not connected to or gate bit 6 pags: and gate output enable bit 1 = andi is connected to or gate 0 = andi is not connected to or gate bit 5 acen: and gate c input enable bit 1 = mci is connected to and gate 0 = mci is not connected to and gate bit 4 acnen: and gate c input inverted enable bit 1 = inverted mci is connected to and gate 0 = inverted mci is not connected to and gate downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 311 dspic33evxxxgm00x/10x family bit 3 aben: and gate b input enable bit 1 = mbi is connected to and gate 0 = mbi is not connected to and gate bit 2 abnen: and gate b input inverted enable bit 1 = inverted mbi is connected to and gate 0 = inverted mbi is not connected to and gate bit 1 aaen: and gate a input enable bit 1 = mai is connected to and gate 0 = mai is not connected to and gate bit 0 aanen: and gate a input inverted enable bit 1 = inverted mai is connected to and gate 0 = inverted mai is not connected to and gate register 25-5: cmxmskcon: comparator x mask gating control register (continued) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 312 ? 2013-2015 microchip technology inc. register 25-6: cmxfltr: comparat or x filter control register u-0 u-0 u-0 u-0 u-0 u-0 u-0 u-0 bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cfsel2 cfsel1 cfsel0 cfltren cfdiv2 cfdiv1 cfdiv0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15-7 unimplemented: read as 0 bit 6-4 cfsel<2:0>: comparator x filter input clock select bits 111 = t5clk ( 1 ) 110 = t4clk ( 2 ) 101 = t3clk ( 1 ) 100 = t2clk ( 2 ) 011 = reserved 010 = synco1 ( 3 ) 001 = f osc ( 4 ) 000 = f p ( 4 ) bit 3 cfltren: comparator x filter enable bit 1 = digital filter is enabled 0 = digital filter is disabled bit 2-0 cfdiv<2:0>: comparator x filter clock divide select bits 111 = clock divide 1:128 110 = clock divide 1:64 101 = clock divide 1:32 100 = clock divide 1:16 011 = clock divide 1:8 010 = clock divide 1:4 001 = clock divide 1:2 000 = clock divide 1:1 note 1: see the type c timer block diagram ( figure 13-2 ). 2: see the type b timer block diagram ( figure 13-1 ). 3: see the high-speed pwmx module register interconnection diagram ( figure 17-2 ). 4: see the oscillator system diagram ( figure 9-1 ). downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 313 dspic33evxxxgm00x/10x family 26.0 comparator voltage reference 26.1 configuring the comparator voltage reference the comparator voltage reference module is controlled through the cvrxcon registers ( register 26-1 and register 26-2 ). the comparator voltage reference provides a range of output voltages with 128 distinct levels. the comparator reference supply voltage can come from either v dd and v ss , or the external cv ref + and av ss pins. the voltage source is selected by the cvrss bit (cvrxcon<11>). the settling time of the comparator voltage reference must be considered when changing the cv ref output. note 1: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to op amp/comparator (ds70000357) in the dspic33/pic24 family reference manual , which is avail- able from the microchip web site ( www.microchip.com ). 2: some registers and associated bits described in this section may not be available on all devices. refer to section 4.0 memory organization in this data sheet for device-specific register and bit information. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 314 ? 2013-2015 microchip technology inc. figure 26-1: comparator volt age reference block diagram r cvren cvrss = 0 av dd cv ref + cvrss = 1 rr r r r r 128 steps cv ref1o cvr3 cvr2 cvr1 cvr0 cvr1con<6:0> cv rsrc cv refin vrefsel 10 r cvren cvrss = 0 av dd cv ref + cvrss = 1 rr r r r r 128 steps cv ref2o cvroe vrefsel 01 av ss av ss cvroe (cvr1con<11>) (cvr1con<11>) (cvr1con<15>) (cvr2con<11>) (cvr2con<11>) (cvr2con<15>) (cvr1con<14>) (cvr2con<10>) (cvr2con<14>) (cvr1con<10>) cvr4 cvr5 cvr6 cv rsrc 128-to-1 mux cvr3 cvr2 cvr1 cvr0 cvr2con<6:0> cvr4 cvr5 cvr6 128-to-1 mux note 1: cv ref2o and cvroe (cvr2con<14>) is not available on the 28-pin devices. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 315 dspic33evxxxgm00x/10x family 26.2 comparator voltage reference registers register 26-1: cvr1con: co mparator voltage reference control register 1 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 u-0 u-0 cvren cvroe cvrss vrefsel bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cvr6 cvr5 cvr4 cvr3 cvr2 cvr1 cvr0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 cvren: comparator voltage reference enable bit 1 = comparator voltage reference circuit is powered on 0 = comparator voltage reference circuit is powered down bit 14 cvroe: comparator voltage reference output enable (cv ref1o pin) bit 1 = voltage level is output on the cv ref1o pin 0 = voltage level is disconnected from the cv ref1o pin bit 13-12 unimplemented: read as 0 bit 11 cvrss: comparator voltage reference source selection bit 1 = comparator reference source, cv rsrc = cv ref + C av ss 0 = comparator reference source, cv rsrc = av dd C av ss bit 10 vrefsel: voltage reference select bit 1 = cv refin = cv ref + 0 = cv refin is generated by the resistor network bit 9-7 unimplemented: read as 0 bit 6-0 cvr<6:0>: comparator voltage reference value selection bits 1111111 = 127/128 x v ref input voltage 0000000 = 0.0 volts downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 316 ? 2013-2015 microchip technology inc. register 26-2: cvr2con: co mparator voltage reference control register 2 r/w-0 r/w-0 u-0 u-0 r/w-0 r/w-0 u-0 u-0 cvren cvroe ( 1 ) cvrss vrefsel bit 15 bit 8 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 cvr6 cvr5 cvr4 cvr3 cvr2 cvr1 cvr0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as 0 -n = value at por 1 = bit is set 0 = bit is cleared x = bit is unknown bit 15 cvren: comparator voltage reference enable bit 1 = comparator voltage reference circuit is powered on 0 = comparator voltage reference circuit is powered down bit 14 cvroe: comparator voltage reference output enable (cv ref2o pin) bit ( 1 ) 1 = voltage level is output on the cv ref2o pin 0 = voltage level is disconnected from the cv ref2o pin bit 13-12 unimplemented: read as 0 bit 11 cvrss: comparator voltage reference source selection bit 1 = comparator reference source, cv rsrc = cv ref + C av ss 0 = comparator reference source, cv rsrc = av dd C av ss bit 10 vrefsel: voltage reference select bit 1 = comparator reference source 2 (cvr2) provides inverting input voltage when vrefsel (cvr1con<10>) = 0 0 = comparator reference source 1 (cvr1) provides inverting input voltage when vrefsel (cvr1con<10>) = 0 bit 9-7 unimplemented: read as 0 bit 6-0 cvr<6:0>: comparator voltage reference value selection bits 1111111 = 127/128 x v ref input voltage 0000000 = 0.0 volts note 1: cvroe (cvr2con<14>) is not available on the 28-pin devices. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 317 dspic33evxxxgm00x/10x family 27.0 special features the dspic33evxxxgm00x/10x family devices include several features intended to maximize application flexibility and reliability, and minimize cost through elimination of external components. these are: flexible configuration watchdog timer (wdt) code protection and codeguard? security in-circuit serial programming? (icsp?) in-circuit emulation 27.1 configuration bits in dspic33evxxxgm00x/10x family devices, the configuration bytes are implemented as volatile memory. this means that configuration data must be programmed each time the device is powered up. configuration data is stored at the top of the on-chip program memory space, known as the flash configu- ration bytes. their specific locations are shown in table 27-1 . the configuration data is automatically loaded from the flash configuration bytes to the proper configuration shadow registers during device resets. when creating applications for these devices, users should always specifically allocate the location of the flash configuration bytes for configuration data in their code for the compiler. this is to ensure that program code is not stored in this address when the code is compiled. the upper 2 bytes of all flash configuration words in program memory should always be 1111 1111 1111 1111 . this makes them appear to be nop instructions in the remote event that their locations are ever executed by accident. since config- uration bits are not implemented in the corresponding locations, writing 1 s to these locations has no effect on device operation. the configuration flash bytes map is shown in table 27-1 . note: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the related section of the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). note: configuration data is reloaded on all types of device resets. note: performing a page erase operation on the last page of program memory clears the flash configuration bytes, enabling code protection as a result. therefore, users should avoid performing page erase operations on the last page of program memory. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 318 ? 2013-2015 microchip technology inc. table 27-1: configuration byte register map file name address device memory size (kbytes) bits 23-16 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 fsec 005780 32 aivtdis css2 css1 css0 cwrp gss1 gss0 gwrp bsen bss1 bss0 bwrp 00ab80 64 015780 128 02ab80 256 fbslim 005790 32 bslim<12:0> 00ab90 64 015790 128 02ab90 256 reserved 005794 32 reserved ( 1 ) 00ab94 64 015794 128 02ab94 256 foscsel 005798 32 ieso fnosc2 fnosc1 fnosc0 00ab98 64 015798 128 02ab98 256 fosc 00579c 32 pllken fcksm1 fcksm0 iol1way osciofnc poscmd1 poscmd0 00ab9c 64 01579c 128 02ab9c 256 fwdt 0057a0 32 wdtwin1 wdtwin0 windis fwdten1 fwdten0 wdtpre wdtps3 wdtps2 wdtps1 wdtps0 00aba0 64 0157a0 128 02aba0 256 fpor 0057a4 32 b o r e n 00aba4 64 0157a4 128 02aba4 256 ficd 0057a8 32 r e s e r v e d ( 2 ) ics1 ics0 00aba8 64 0157a8 128 02aba8 256 legend: = unimplemented, read as 1 . note 1: this bit is reserved and must be programmed as 0 . 2: this bit is reserved and must be programmed as 1 . downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 319 dspic33evxxxgm00x/10x family fdmtintvl 0057ac 32 dmtivt<15:0> 00abac 64 0157ac 128 02abac 256 fdmtintvh 0057b0 32 dmtivt<31:16> 00abb0 64 0157b0 128 02abb0 256 fdmtcntl 0057b4 32 dmtcnt<15:0> 00abb4 64 0157b4 128 02abb4 256 fdmtcnth 0057b8 32 dmtcnt<31:16> 00ab8 64 0157b8 128 02abb8 256 fdmt 0057bc 32 d m t e n 00abbc 64 0157bc 128 02abbc 256 fdevopt 0057c0 32 alti2c1 reserved ( 2 ) p w m l o c k 00abc0 64 0157c0 128 02abc0 256 faltreg 0057c4 32 ctxt2<2:0> ctxt1<2:0> 00abc4 64 0157c4 128 02abc4 256 table 27-1: configuration byte register map (continued) file name address device memory size (kbytes) bits 23-16 bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8 bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 legend: = unimplemented, read as 1 . note 1: this bit is reserved and must be programmed as 0 . 2: this bit is reserved and must be programmed as 1 . downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 320 ? 2013-2015 microchip technology inc. table 27-2: dspic33evxxxgm00x/10x configuration bits description bit field register description bwrp fsec boot segment write-protect bit 1 = user program memory is not write-protected 0 = user program memory is write-protected bss<1:0> fsec boot segment code flash protection level bits 11 = no protection (other than bwrp write protection) 10 = standard security 0x = high security bsen fsec boot segment control bit 1 = no boot segment 0 = boot segment size is determined by bslim<12:0> gwrp fsec general segment write-protect bit 1 = user program memory is not write-protected 0 = user program memory is write-protected gss<1:0> fsec general segment code flash protection level bits 11 = no protection (other than gwrp write protection) 10 = standard security 0x = high security cwrp fsec configuration segment write-protect bit 1 = configuration segment is not write-protected 0 = configuration segment is write-protected css<2:0> fsec configuration segment code flash protection level bits 111 = no protection (other than cwrp write protection) 110 = standard security 10x = enhanced security 0xx = high security aivtdis fsec alternate interrupt vector table disable bit 1 = disables aivt 0 = enables aivt bslim<12:0> fbslim boot segment code flash page address limit bits contains the page address of the first active general segment page. the value to be programmed is the inverted page address, such that programming additional 0 s can only increase the boot segment size. for example, 0x1ffd = 2 pages or 1024 instruction words. fnosc<2:0> foscsel initial oscillator source selection bits 111 = internal fast rc (frc) oscillator with postscaler 110 = internal fast rc (frc) oscillator with divide-by-16 101 = lprc oscillator 100 = reserved 011 = primary (xt, hs, ec) oscillator with pll 010 = primary (xt, hs, ec) oscillator 001 = internal fast rc (frc) oscillator with pll 000 = frc oscillator ieso foscsel two-speed oscillator start-up enable bit 1 = starts up device with frc, then automatically switches to the user-selected oscillator source when ready 0 = starts up device with user-selected oscillator source poscmd<1:0> fosc primary oscillator mode select bits 11 = primary oscillator is disabled 10 = hs crystal oscillator mode 01 = xt crystal oscillator mode 00 = ec (external clock) mode downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 321 dspic33evxxxgm00x/10x family osciofnc fosc osc2 pin function bit (except in xt and hs modes) 1 = osc2 is the clock output 0 = osc2 is the general purpose digital i/o pin iol1way fosc peripheral pin select configuration bit 1 = allows only one reconfiguration 0 = allows multiple reconfigurations fcksm<1:0> fosc clock switching mode bits 1x = clock switching is disabled, fail-safe clock monitor is disabled 01 = clock switching is enabled, fail-safe clock monitor is disabled 00 = clock switching is enabled, fail-safe clock monitor is enabled pllken fosc pll lock wait enable bit 1 = clock switches to the pll source; will wait until the pll lock signal is valid 0 = clock switch will not wait for pll lock wdtps<3:0> fwdt watchdog timer postscaler bits 1111 = 1:32,768 1110 = 1:16,384 0001 = 1:2 0000 = 1:1 wdtpre fwdt watchdog timer prescaler bit 1 = 1:128 0 = 1:32 fwdten<1:0> fwdt watchdog timer enable bits 11 = wdt is enabled in hardware 10 = wdt is controlled through the swdten bit 01 = wdt is enabled only while device is active and disabled in sleep; the swdten bit is disabled 00 = wdt and the swdten bit are disabled windis fwdt watchdog timer window enable bit 1 = watchdog timer is in non-window mode 0 = watchdog timer is in window mode wdtwin<1:0> fwdt watchdog timer window select bits 11 = wdt window is 25% of wdt period 10 = wdt window is 37.5% of wdt period 01 = wdt window is 50% of wdt period 00 = wdt window is 75% of wdt period boren fpor brown-out reset (bor) detection enable bit 1 = bor is enabled 0 = bor is disabled ics<1:0> ficd icd communication channel select bits 11 = communicates on pgec1 and pged1 10 = communicates on pgec2 and pged2 01 = communicates on pgec3 and pged3 00 = reserved, do not use dmtivt<15:0> fdmtintvl lower 16 bits of 32-bit field that configures the dmt window interval bits dmtivt<31:16> fdmtintvh upper 16 bits of 32-bit field that configures the dmt window interval bits dmtcnt<15:0> fdmtcntl lower 16 bits of 32-bit field that configures the dmt instruction count time-out value bits table 27-2: dspic33evxxxgm00x/10x config uration bits description (continued) bit field register description downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 322 ? 2013-2015 microchip technology inc. dmtcnt<31:16> fdmcnth upper 16 bits of 32-bit field that configures the dmt instruction count time-out value bits dmten fdmt deadman timer enable bit 1 = deadman timer is enabled and cannot be disabled by software 0 = deadman timer is disabled and can be enabled by software pwmlock fdevopt pwm lock enable bit 1 = certain pwm registers may only be written after a key sequence 0 = pwm registers may be written without a key sequence alti2c1 fdevopt alternate i 2 c? pins for i2c1 bit 1 = i2c1 is mapped to the sda1/scl1 pins 0 = i2c1 is mapped to the asda1/ascl1 pins ctxt1<2:0> faltreg specifies the alternate working register set 1 association with interrupt priority level (ipl) bits 111 = not assigned 110 = alternate register set 1 is assigned to ipl level 6 101 = alternate register set 1 is assigned to ipl level 5 100 = alternate register set 1 is assigned to ipl level 4 011 = alternate register set 1 is assigned to ipl level 3 010 = alternate register set 1 is assigned to ipl level 2 001 = alternate register set 1 is assigned to ipl level 1 000 = not assigned ctxt2<2:0> faltreg specifies the alternate working register set 2 association with interrupt priority level (ipl) bits 111 = not assigned 110 = alternate register set 2 is assigned to ipl level 6 101 = alternate register set 2 is assigned to ipl level 5 100 = alternate register set 2 is assigned to ipl level 4 011 = alternate register set 2 is assigned to ipl level 3 010 = alternate register set 2 is assigned to ipl level 2 001 = alternate register set 2 is assigned to ipl level 1 000 = not assigned table 27-2: dspic33evxxxgm00x/10x config uration bits description (continued) bit field register description downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 323 dspic33evxxxgm00x/10x family register 27-1: devid: device id register rrrrrrrr devid<23:16> ( 1 ) bit 23 bit 16 rrrrrrrr devid<15:8> ( 1 ) bit 15 bit 8 rrrrrrrr devid<7:0> ( 1 ) bit 7 bit 0 legend: r = read-only bit u = unimplemented bit bit 23-0 devid<23:0>: device identifier bits ( 1 ) note 1: refer to dspic33e/pic24e flash programming specification for devices with volatile configuration bits (ds70663) for the list of device id values. register 27-2: devrev: device revision register rrrrrrrr devrev<23:16> ( 1 ) bit 23 bit 16 rrrrrrrr devrev<15:8> ( 1 ) bit 15 bit 8 rrrrrrrr devrev<7:0> ( 1 ) bit 7 bit 0 legend: r = read-only bit u = unimplemented bit bit 23-0 devrev<23:0>: device revision bits ( 1 ) note 1: refer to dspic33e/pic24e flash programming specification for devices with volatile configuration bits (ds70663) for the list of device revision values. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 324 ? 2013-2015 microchip technology inc. 27.2 user otp memory locations, 800f80h-800ffeh, are a one-time- programmable (otp) memory area. the user otp words can be used for storing product information, such as serial numbers, system manufacturing dates, manu- facturing lot numbers and other application-specific information. 27.3 on-chip voltage regulator all of the dspic33evxxxgm00x/10x family devices power their core digital logic at a nominal 1.8v. this can create a conflict for designs that are required to operate at a higher typical voltage, such as 5.0v. to simplify system design, all devices in the dspic33evxxxgm00x/10x family incorporate an on-chip regulator that allows the device to run its core logic from v dd . the regulator provides power to the core from the other v dd pins. a low-esr (less than 1 ohm) capacitor (such as tantalum or ceramic) must be connected to the v cap pin (see figure 27-1 ). this helps to maintain the stability of the regulator. the recommended value for the filter capacitor is provided in table 30-5 , located in section 30.0 electrical characteristics . figure 27-1: conne ctions for the on-chip voltage regulator ( 1 , 2 , 3 ) 27.4 brown-out reset (bor) the brown-out reset (bor) module is based on an internal voltage reference circuit that monitors the reg- ulated supply voltage, v cap . the main purpose of the bor module is to generate a device reset when a brown-out condition occurs. brown-out conditions are generally caused by glitches on the ac mains (for example, missing portions of the ac cycle waveform due to bad power transmission lines or voltage sags due to excessive current draw when a large inductive load is turned on). a bor generates a reset pulse, which resets the device. the bor selects the clock source based on the device configuration bit values (fnosc<2:0> and poscmd<1:0>). if an oscillator mode is selected, the bor activates the oscillator start-up timer (ost). the system clock is held until ost expires. if the pll is used, the clock is held until the lock bit (osccon<5>) is 1 . concurrently, the power-up timer (pwrt) time-out (t pwrt ) is applied before the internal reset is released. if t pwrt = 0 and a crystal oscillator is being used, then a nominal delay of t fscm is applied. the total delay in this case is t fscm . refer to parameter sy35 in table 30-21 of section 30.0 electrical characteristics for specific t fscm values. the bor status bit (rcon<1>) is set to indicate that a bor has occurred. the bor circuit continues to oper- ate while in sleep or idle mode and resets the device should v dd fall below the bor threshold voltage. note: it is important for the low-esr capacitor to be placed as close as possible to the v cap pin. note 1: these are typical operating voltages. refer to ta b l e 3 0 -4 located in section 30.1 dc characteristics for the full operating ranges of v dd and v cap . 2: it is important for the low-esr capacitor to be placed as close as possible to the v cap pin. 3: typical v cap pin voltage = 1.8v when v dd v ddmin . av dd v cap v ss dspic33ev 5.0v c efc v dd av ss downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 325 dspic33evxxxgm00x/10x family 27.5 watchdog timer (wdt) for dspic33evxxxgm00x/10x family devices, the wdt is driven by the lprc oscillator. when the wdt is enabled, the clock source is also enabled. 27.5.1 prescaler/postscaler the nominal wdt clock source from lprc is 32 khz. this feeds a prescaler that can be configured for either 5-bit (divide-by-32) or 7-bit (divide-by-128) operation. the prescaler is set by the wdtpre configuration bit. with a 32 khz input, the prescaler yields a wdt time-out period (t wdt ), as shown in parameter sy12 in table 30-21 . a variable postscaler divides down the wdt prescaler output and allows for a wide range of time-out periods. the postscaler is controlled by the wdtpost<3:0> configuration bits (fwdt<3:0>), which allow the selection of 16 settings, from 1:1 to 1:32,768. using the prescaler and postscaler, time-out periods ranging from 1 ms to 131 seconds can be achieved. the wdt, prescaler and postscaler are reset: on any device reset on the completion of a clock switch, whether invoked by software (i.e., setting the oswen bit after changing the noscx bits) or by hardware (i.e., fail-safe clock monitor) when a pwrsav instruction is executed (i.e., sleep or idle mode is entered) when the device exits sleep or idle mode to resume normal operation by a clrwdt instruction during normal execution 27.5.2 sleep and idle modes if the wdt is enabled, it continues to run during sleep or idle modes. when the wdt time-out occurs, the device wakes the device and code execution continues from where the pwrsav instruction was executed. the corre- sponding sleep or idle bit (rcon<3:2>) needs to be cleared in software after the device wakes up. 27.5.3 enabling wdt the wdt is enabled or disabled by the fwdten<1:0> configuration bits in the fwdt configuration register. when the fwdten<1:0> configuration bits are set, the wdt is always enabled. the wdt can be optionally controlled in software when the fwdtenx configuration bits have been programmed to 00 . the wdt is enabled in software by setting the swdten control bit (rcon<5>). the swdten control bit is cleared on any device reset. the software wdt option allows the user application to enable the wdt for critical code segments and disable the wdt during non-critical segments for maximum power savings. the wdt flag bit, wdto (rcon<4>), is not automatically cleared following a wdt time-out. to detect subsequent wdt events, the flag must be cleared in software. 27.5.4 wdt window the watchdog timer has an optional windowed mode enabled by programming the windis bit in the wdt configuration register (fwdt<7>). in the windowed mode (windis = 0 ), the wdt should be cleared based on the settings in the programmable watchdog timer window (wdtwin<1:0>) select bits. figure 27-2: wdt block diagram note: the clrwdt and pwrsav instructions clear the prescaler and postscaler counts when executed. 0 1 wdtpre wdtpost<3:0> watchdog timer prescaler (divide-by-n1) postscaler (divide-by-n2) sleep/idle wdt wdt window select windis wdt clrwdt instruction swdten fwdten<1:0> lprc clock rs rs wake-up reset wdtwin<1:0> all device resets transition to new clock source exit sleep or idle mode pwrsav instruction clrwdt instruction downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 326 ? 2013-2015 microchip technology inc. 27.6 in-circuit serial programming the dspic33evxxxgm00x/10x family devices can be serially programmed while in the end application circuit. this is done with two lines for clock and data, and three other lines for power, ground and the programming sequence. serial programming allows customers to manufacture boards with unprogrammed devices and then program the device just before shipping the prod- uct. serial programming also allows the most recent firmware or a custom firmware to be programmed. refer to dspic33e/pic24e flash programming specification for devices with volatile configuration bits (ds70663) for details about in-circuit serial programming? (icsp?). any of the following three pairs of programming clock/ data pins can be used: pgec1 and pged1 pgec2 and pged2 pgec3 and pged3 27.7 in-circuit debugger when mplab ? icd 3 or real ice? is selected as a debugger, the in-circuit debugging functionality is enabled. this function allows simple debugging functions when used with mplab x ide. debugging functionality is controlled through the pgecx (emulation/debug clock) and pgedx (emulation/debug data) pin functions. any of the following three pairs of debugging clock/data pins can be used: pgec1 and pged1 pgec2 and pged2 pgec3 and pged3 to use the in-circuit debugger function of the device, the design must implement icsp connections to mclr , v dd , v ss and the pgecx/pgedx pin pair. in addition, when the feature is enabled, some of the resources are not available for general use. these resources include the first 80 bytes of data ram and two i/o pins (pgecx and pgedx). 27.8 code protection and codeguard? security the dspic33evxxxgm00x/10x family devices offer intermediate codeguard security that supports general segment (gs) security, boot segment (bs) security and configuration segment (cs) security. this feature helps protect individual intellectual properties. note: refer to codeguard? intermediate security (ds70005182) in the dspic33/ pic24 family reference manual for further information on usage, configuration and operation of codeguard security. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 327 dspic33evxxxgm00x/10x family 28.0 instruction set summary the dspic33ev instruction set is almost identical to that of the dspic30f and dspic33f. most instructions are a single program memory word (24 bits). only three instructions require two program memory locations. each single-word instruction is a 24-bit word, divided into an 8-bit opcode, which specifies the instruction type and one or more operands, which further specify the operation of the instruction. the instruction set is highly orthogonal and is grouped into following five basic categories: word or byte-oriented operations bit-oriented operations literal operations dsp operations control operations table 28-1 lists the general symbols used in describing the instructions. the dspic33e instruction set summary in tab l e 2 8- 2 lists all the instructions, along with the status flags affected by each instruction. most word or byte-oriented w register instructions (including barrel shift instructions) have the following three operands: the first source operand, which is typically a register wb without any address modifier the second source operand, which is typically a register ws with or without an address modifier the destination of the result, which is typically a register wd with or without an address modifier however, word or byte-oriented file register instructions have two operands: the file register specified by the value f the destination, which could be either the file register f or the w0 register, which is denoted as wreg most bit-oriented instructions (including simple rotate/ shift instructions) have two operands: the w register (with or without an address modifier) or file register (specified by the value of ws or f) the bit in the w register or file register (specified by a literal value or indirectly by the contents of register wb) the literal instructions that involve data movement can use some of the following operands: a literal value to be loaded into a w register or file register (specified by k) the w register or file register where the literal value is to be loaded (specified by wb or f) however, literal instructions that involve arithmetic or logical operations use some of the following operands: the first source operand, which is a register wb without any address modifier the second source operand, which is a literal value the destination of the result (only if not the same as the first source operand), which is typically a register wd with or without an address modifier the mac class of dsp instructions can use some of the following operands: the accumulator (a or b) to be used (required operand) the w registers to be used as the two operands the x and y address space prefetch operations the x and y address space prefetch destinations the accumulator write-back destination the other dsp instructions do not involve any multiplication and can include: the accumulator to be used (required) the source or destination operand (designated as wso or wdo, respectively) with or without an address modifier the amount of shift specified by a w register wn or a literal value the control instructions can use some of the following operands: a program memory address the mode of the table read and table write instructions note: this data sheet summarizes the features of the dspic33evxxxgm00x/10x family of devices. it is not intended to be a comprehensive reference source. to complement the information in this data sheet, refer to the related section of the dspic33/pic24 family reference manual , which is available from the microchip web site ( www.microchip.com ). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 328 ? 2013-2015 microchip technology inc. most instructions are a single word. certain double-word instructions are designed to provide all the required information in these 48 bits. in the second word, the 8msbs are 0 s. if this second word is executed as an instruction (by itself), it executes as a nop . the double-word instructions execute in two instruction cycles. most single-word instructions are executed in a single instruction cycle, unless a conditional test is true, or the program counter is changed as a result of the instruction, or a psv or table read is performed. in these cases, the execution takes multiple instruction cycles with the additional instruction cycle(s) executed as a nop . certain instructions that involve skipping over the subsequent instruction require either two or three cycles if the skip is performed, depending on whether the instruction being skipped is a single-word or two- word instruction. moreover, double-word moves require two cycles. note: for more details on the instruction set, refer to the 16-bit mcu and dsc programmers reference manual (ds70157). table 28-1: symbols used in opcode descriptions field description #text means literal defined by text (text) means content of text [text] means the location addressed by text { } optional field or operation a ? {b, c, d} a is selected from the set of values b, c, d register bit field .b byte mode selection .d double-word mode selection .s shadow register select .w word mode selection (default) acc one of two accumulators {a, b} awb accumulator write-back destination address register ?? {w13, [w13]+ = 2} bit4 4-bit bit selection field (used in word-addressed instructions) ?? {0...15} c, dc, n, ov, z mcu status bits: carry, digit carry, negative, overflow, sticky zero expr absolute address, label or expression (resolved by the linker) f file register address ?? {0x0000...0x1fff} lit1 1-bit unsigned literal ?? {0,1} lit4 4-bit unsigned literal ?? {0...15} lit5 5-bit unsigned literal ?? {0...31} lit8 8-bit unsigned literal ?? {0...255} lit10 10-bit unsigned literal ?? {0...255} for byte mode, {0:1023} for word mode lit14 14-bit unsigned literal ?? {0...16384} lit16 16-bit unsigned literal ?? {0...65535} lit23 23-bit unsigned literal ?? {0...8388608}; lsb must be 0 none field does not require an entry, can be blank oa, ob, sa, sb dsp status bits: acca overflow, accb overflow, acca saturat e, accb saturate pc program counter slit10 10-bit signed literal ?? {-512...511} slit16 16-bit signed literal ?? {-32768...32767} slit6 6-bit signed literal ?? {-16...16} wb base w register ?? {w0...w15} wd destination w register ?? { wd, [wd], [wd++], [wd--], [++wd], [--wd] } wdo destination w register ?? { wnd, [wnd], [wnd++], [wnd--], [++wnd], [--wnd], [wnd+wb] } wm,wn dividend, divisor working r egister pair (direct addressing) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 329 dspic33evxxxgm00x/10x family wm*wm multiplicand and multiplier working register pair for square instructions ?? {w4 * w4,w5 * w5,w6 * w6,w7 * w7} wm*wn multiplicand and multiplier working register pair for dsp instructions ? {w4 * w5,w4 * w6,w4 * w7,w5 * w6,w5 * w7,w6 * w7} wn one of 16 working registers ?? {w0...w15} wnd one of 16 destination working registers ?? {w0...w15} wns one of 16 source working registers ?? {w0...w15} wreg w0 (working register used in file register instructions) ws source w register ?? { ws, [ws], [ws++], [ws--], [++ws], [--ws] } wso source w register ?? { wns, [wns], [wns++], [wns--], [++wns], [--wns], [wns+wb] } wx x data space prefetch address register for dsp instructions ? {[w8] + = 6, [w8] + = 4, [w8] + = 2, [w8], [w8] - = 6, [w8] - = 4, [w8] - = 2, [w9] + = 6, [w9] + = 4, [w9] + = 2, [w9], [w9] - = 6, [w9] - = 4, [w9] - = 2, [w9 + w12], none} wxd x data space prefetch destination register for dsp instructions ?? {w4...w7} wy y data space prefetch address register for dsp instructions ? {[w10] + = 6, [w10] + = 4, [w10] + = 2, [w10], [w10] - = 6, [w10] - = 4, [w10] - = 2, [w11] + = 6, [w11] + = 4, [w11] + = 2, [w11], [w11] - = 6, [w11] - = 4, [w1 1] - = 2, [w11 + w12], none} wyd y data space prefetch destination register for dsp instructions ?? {w4...w7} table 28-1: symbols used in opcode descriptions (continued) field description downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 330 ? 2013-2015 microchip technology inc. table 28-2: instruction set overview base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected 1 add add acc add accumulators 1 1 oa,ob,sa, sb add f f = f + wreg 1 1 c,dc,n,ov,z add f,wreg wreg = f + wreg 1 1 c,dc,n,ov,z add #lit10,wn wd = lit10 + wd 1 1 c,dc,n,ov,z add wb,ws,wd wd = wb + ws 1 1 c,dc,n,ov,z add wb,#lit5,wd wd = wb + lit5 1 1 c,dc,n,ov,z add wso,#slit4,acc 16-bit signed add to accumulator 1 1 oa,ob,sa, sb 2 addc addc f f = f + wreg + (c) 1 1 c,dc,n,ov,z addc f,wreg wreg = f + wreg + (c) 1 1 c,dc,n,ov,z addc #lit10,wn wd = lit10 + wd + (c) 1 1 c,dc,n,ov,z addc wb,ws,wd wd = wb + ws + (c) 1 1 c,dc,n,ov,z addc wb,#lit5,wd wd = wb + lit5 + (c) 1 1 c,dc,n,ov,z 3 and and f f = f .and. wreg 1 1 n,z and f,wreg wreg = f .and. wreg 1 1 n,z and #lit10,wn wd = lit10 .and. wd 1 1 n,z and wb,ws,wd wd = wb .and. ws 1 1 n,z and wb,#lit5,wd wd = wb .and. lit5 1 1 n,z 4 asr asr f f = arithmetic right shift f 1 1 c,n,ov,z asr f,wreg wreg = arithmetic right shift f 1 1 c,n,ov,z asr ws,wd wd = arithmetic right shift ws 1 1 c,n,ov,z asr wb,wns,wnd wnd = arithmetic right shift wb by wns 1 1 n,z asr wb,#lit5,wnd wnd = arithmetic right shift wb by lit5 1 1 n,z 5 bclr bclr f,#bit4 bit clear f 1 1 none bclr ws,#bit4 bit clear ws 1 1 none 6 bra bra c,expr branch if carry 1 1 (4) none bra ge,expr branch if greater than or equal 1 1 (4) none bra geu,expr branch if unsigned greater than or equal 1 1 (4) none bra gt,expr branch if greater than 1 1 (4) none bra gtu,expr branch if unsigned greater than 1 1 (4) none bra le,expr branch if less than or equal 1 1 (4) none bra leu,expr branch if unsigned less than or equal 1 1 (4) none bra lt,expr branch if less than 1 1 (4) none bra ltu,expr branch if unsigned less than 1 1 (4) none bra n,expr branch if negative 1 1 (4) none bra nc,expr branch if not carry 1 1 (4) none bra nn,expr branch if not negative 1 1 (4) none bra nov,expr branch if not overflow 1 1 (4) none bra nz,expr branch if not zero 1 1 (4) none bra oa,expr branch if accumulator a overflow 1 1 (4) none bra ob,expr branch if accumulator b overflow 1 1 (4) none bra ov,expr branch if overflow 1 1 (4) none bra sa,expr branch if accumulator a saturated 1 1 (4) none bra sb,expr branch if accumulator b saturated 1 1 (4) none bra expr branch unconditionally 1 4 none bra z,expr branch if zero 1 1 (4) none bra wn computed branch 1 4 none 7 bset bset f,#bit4 bit set f 1 1 none bset ws,#bit4 bit set ws 1 1 none note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 331 dspic33evxxxgm00x/10x family 8 bsw bsw.c ws,wb write c bit to ws 1 1 none bsw.z ws,wb write z bit to ws 1 1 none 9 btg btg f,#bit4 bit toggle f 1 1 none btg ws,#bit4 bit toggle ws 1 1 none 10 btsc btsc f,#bit4 bit test f, skip if clear 1 1 (2 or 3) none btsc ws,#bit4 bit test ws, skip if clear 1 1 (2 or 3) none 11 btss btss f,#bit4 bit test f, skip if set 1 1 (2 or 3) none btss ws,#bit4 bit test ws, skip if set 1 1 (2 or 3) none 12 btst btst f,#bit4 bit test f 1 1 z btst.c ws,#bit4 bit test ws to c 1 1 c btst.z ws,#bit4 bit test ws to z 1 1 z btst.c ws,wb bit test ws to c 1 1 c btst.z ws,wb bit test ws to z 1 1 z 13 btsts btsts f,#bit4 bit test then set f 1 1 z btsts.c ws,#bit4 bit test ws to c, then set 1 1 c btsts.z ws,#bit4 bit test ws to z, then set 1 1 z 14 call call lit23 call subroutine 2 4 sfa call wn call indirect subroutine 1 4 sfa call.l wn call indirect subroutine (long address) 1 4 sfa 15 clr clr f f = 0x0000 1 1 none clr wreg wreg = 0x0000 1 1 none clr ws ws = 0x0000 1 1 none clr acc,wx,wxd,wy,wyd,awb clear accumulator 1 1 oa,ob,sa, sb 16 clrwdt clrwdt clear watchdog timer 1 1 wdto,sleep 17 com com f f = f 11 n , z com f,wreg wreg = f 11 n , z com ws,wd wd = ws 11 n , z 18 cp cp f compare f with wreg 1 1 c,dc,n,ov,z cp wb,#lit8 compare wb with lit8 1 1 c,dc,n,ov,z cp wb,ws compare wb with ws (wb C ws) 1 1 c,dc,n,ov,z 19 cp0 cp0 f compare f with 0x0000 1 1 c,dc,n,ov,z cp0 ws compare ws with 0x0000 1 1 c,dc,n,ov,z 20 cpb cpb f compare f with wreg, with borrow 1 1 c,dc,n,ov,z cpb wb,#lit8 compare wb with lit8, with borrow 1 1 c,dc,n,ov,z cpb wb,ws compare wb with ws, with borrow (wb C ws C c ) 1 1 c,dc,n,ov,z 21 cpseq cpseq wb,wn compare wb with wn, skip if = 1 1 (2 or 3) none cpbeq cpbeq wb,wn,expr compare wb with wn, branch if = 1 1 (5) none 22 cpsgt cpsgt wb,wn compare wb with wn, skip if > 1 1 (2 or 3) none cpbgt cpbgt wb,wn,expr compare wb with wn, branch if > 1 1 (5) none 23 cpslt cpslt wb,wn compare wb with wn, skip if < 1 1 (2 or 3) none cpblt cpblt wb,wn,expr compare wb with wn, branch if < 1 1 (5) none 24 cpsne cpsne wb,wn compare wb with wn, skip if ? 11 (2 or 3) none cpbne cpbne wb,wn,expr compare wb with wn, branch if ? 11 ( 5 ) n o n e table 28-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 332 ? 2013-2015 microchip technology inc. 25 ctxtswp ctxtswp #lit3 switch cpu register context to context defined by lit3 12 n o n e ctxtswp wn switch cpu register context to context defined by wn 12 n o n e 26 daw daw wn wn = decimal adjust wn 1 1 c 27 dec dec f f = f C 1 1 1 c,dc,n,ov,z dec f,wreg wreg = f C 1 1 1 c,dc,n,ov,z dec ws,wd wd = ws C 1 1 1 c,dc,n,ov,z 28 dec2 dec2 f f = f C 2 1 1 c,dc,n,ov,z dec2 f,wreg wreg = f C 2 1 1 c,dc,n,ov,z dec2 ws,wd wd = ws C 2 1 1 c,dc,n,ov,z 29 disi disi #lit14 disable interrupts for k instruction cycles 1 1 none 30 div div.s wm,wn signed 16/16-bit integer divide 1 18 n,z,c,ov div.sd wm,wn signed 32/16-bit integer divide 1 18 n,z,c,ov div.u wm,wn unsigned 16/16-bit integer divide 1 18 n,z,c,ov div.ud wm,wn unsigned 32/16-bit integer divide 1 18 n,z,c,ov 31 divf divf wm,wn signed 16/16-bit fractional divide 1 18 n,z,c,ov 32 do do #lit15,expr do code to pc + expr, lit15 + 1 times 2 2 none do wn,expr do code to pc + expr, (wn) + 1 times 2 2 none 33 ed ed wm*wm,acc,wx,wy,wxd euclidean distance (no accumulate) 1 1 oa,ob,oab, sa,sb,sab 34 edac edac wm*wm,acc,wx,wy,wxd euclidean distance 1 1 oa,ob,oab, sa,sb,sab 35 exch exch wns,wnd swap wns with wnd 1 1 none 36 fbcl fbcl ws,wnd find bit change from left (msb) side 1 1 c 37 ff1l ff1l ws,wnd find first one from left (msb) side 1 1 c 38 ff1r ff1r ws,wnd find first one from right (lsb) side 1 1 c 39 goto goto expr go to address 2 4 none goto wn go to indirect 1 4 none goto.l wn go to indirect (long address) 1 4 none 40 inc inc f f = f + 1 1 1 c,dc,n,ov,z inc f,wreg wreg = f + 1 1 1 c,dc,n,ov,z inc ws,wd wd = ws + 1 1 1 c,dc,n,ov,z 41 inc2 inc2 f f = f + 2 1 1 c,dc,n,ov,z inc2 f,wreg wreg = f + 2 1 1 c,dc,n,ov,z inc2 ws,wd wd = ws + 2 1 1 c,dc,n,ov,z 42 ior ior f f = f .ior. wreg 1 1 n,z ior f,wreg wreg = f .ior. wreg 1 1 n,z ior #lit10,wn wd = lit10 .ior. wd 1 1 n,z ior wb,ws,wd wd = wb .ior. ws 1 1 n,z ior wb,#lit5,wd wd = wb .ior. lit5 1 1 n,z 43 lac lac wso,#slit4,acc load accumulator 1 1 oa,ob,oab, sa,sb,sab 44 lnk lnk #lit14 link frame pointer 1 1 sfa 45 lsr lsr f f = logical right shift f 1 1 c,n,ov,z lsr f,wreg wreg = logical right shift f 1 1 c,n,ov,z lsr ws,wd wd = logical right shift ws 1 1 c,n,ov,z lsr wb,wns,wnd wnd = logical right shift wb by wns 1 1 n,z lsr wb,#lit5,wnd wnd = logical right shift wb by lit5 1 1 n,z table 28-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 333 dspic33evxxxgm00x/10x family 46 mac mac wm*wn,acc,wx,wxd,wy,wyd,awb multiply and accumulate 1 1 oa,ob,oab, sa,sb,sab mac wm*wm,acc,wx,wxd,wy,wyd square and accumulate 1 1 oa,ob,oab, sa,sb,sab 47 mov mov f,wn move f to wn 1 1 none mov f move f to f 1 1 none mov f,wreg move f to wreg 1 1 none mov #lit16,wn move 16-bit literal to wn 1 1 none mov.b #lit8,wn move 8-bit literal to wn 1 1 none mov wn,f move wn to f 1 1 none mov wso,wdo move ws to wd 1 1 none mov wreg,f move wreg to f 1 1 none mov.d wns,wd move double from w(ns):w(ns + 1) to wd 1 2 none mov.d ws,wnd move double from ws to w(nd + 1):w(nd) 1 2 none 48 movpag movpag #lit10,dsrpag move 10-bit literal to dsrpag 1 1 none movpag #lit9,dswpag move 9-bit literal to dswpag 1 1 none movpag #lit8,tblpag move 8-bit literal to tblpag 1 1 none movpagw ws, dsrpag move ws<9:0> to dsrpag 1 1 none movpagw ws, dswpag move ws<8:0> to dswpag 1 1 none movpagw ws, tblpag move ws<7:0> to tblpag 1 1 none 49 movsac movsac acc,wx,wxd,wy,wyd,awb prefetch and store accumulator 1 1 none 50 mpy mpy wm*wn,acc,wx,wxd,wy,wyd multiply wm by wn to accumulator 1 1 oa,ob,oab, sa,sb,sab mpy wm*wm,acc,wx,wxd,wy,wyd square wm to accumulator 1 1 oa,ob,oab, sa,sb,sab 51 mpy.n mpy.n wm*wn,acc,wx,wxd,wy,wyd -(multiply wm by wn) to accumulator 1 1 none 52 msc msc wm*wm,acc,wx,wxd,wy,wyd,awb multiply and subtract from accumulator 1 1 oa,ob,oab, sa,sb,sab table 28-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 334 ? 2013-2015 microchip technology inc. 53 mul mul.ss wb,ws,wnd {wnd + 1, wnd} = signed(wb) * signed(ws) 11 n o n e mul.ss wb,ws,acc accumulator = signed(wb) * signed(ws) 1 1 none mul.su wb,ws,wnd {wnd + 1, wnd} = signed(wb) * unsigned(ws) 11 n o n e mul.su wb,ws,acc accumulator = signed(wb) * unsigned(ws) 11 n o n e mul.su wb,#lit5,acc accumulator = signed(wb) * unsigned(lit5) 1 1 none mul.us wb,ws,wnd {wnd + 1, wnd} = unsigned(wb) * signed(ws) 11 n o n e mul.us wb,ws,acc accumulator = unsigned(wb) * signed(ws) 11 n o n e mul.uu wb,ws,wnd {wnd + 1, wnd} = unsigned(wb) * unsigned(ws) 11 n o n e mul.uu wb,#lit5,acc accumulator = unsigned(wb) * unsigned(lit5) 11 n o n e mul.uu wb,ws,acc accumulator = unsigned(wb) * unsigned(ws) 11 n o n e mulw.ss wb,ws,wnd wnd = signed(wb) * signed(ws) 1 1 none mulw.su wb,ws,wnd wnd = signed(wb) * unsigned(ws) 1 1 none mulw.us wb,ws,wnd wnd = unsigned(wb) * signed(ws) 1 1 none mulw.uu wb,ws,wnd wnd = unsigned(wb) * unsigned(ws) 1 1 none mul.su wb,#lit5,wnd {wnd + 1, wnd} = signed(wb) * unsigned(lit5) 11 n o n e mul.su wb,#lit5,wnd wnd = signed(wb) * unsigned(lit5) 1 1 none mul.uu wb,#lit5,wnd {wnd + 1, wnd} = unsigned(wb) * unsigned(lit5) 11 n o n e mul.uu wb,#lit5,wnd wnd = unsigned(wb) * unsigned(lit5) 1 1 none mul f w3:w2 = f * wreg 1 1 none 54 neg neg acc negate accumulator 1 1 oa,ob,oab, sa,sb,sab neg f f = f + 1 1 1 c,dc,n,ov,z neg f,wreg wreg = f + 1 1 1 c,dc,n,ov,z neg ws,wd wd = ws + 1 1 1 c,dc,n,ov,z 55 nop nop no operation 1 1 none nopr no operation 1 1 none 56 pop pop f pop f from top-of-stack (tos) 1 1 none pop wdo pop from top-of-stack (tos) to wdo 1 1 none pop.d wnd pop from top-of-stack (tos) to w(nd):w(nd + 1) 12 n o n e pop.s pop shadow registers 1 1 all 57 push push f push f to top-of-stack (tos) 1 1 none push wso push wso to top-of-stack (tos) 1 1 none push.d wns push w(ns):w(ns + 1) to top-of-stack (tos) 12 n o n e push.s push shadow registers 1 1 none 58 pwrsav pwrsav #lit1 go into sleep or idle mode 1 1 wdto,sleep 59 rcall rcall expr relative call 1 4 sfa rcall wn computed call 1 4 sfa 60 repeat repeat #lit15 repeat next instruction lit15 + 1 times 1 1 none repeat wn repeat next instruction (wn) + 1 times 1 1 none 61 reset reset software device reset 1 1 none 62 retfie retfie return from interrupt 1 6 (5) sfa table 28-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 335 dspic33evxxxgm00x/10x family 63 retlw retlw #lit10,wn return with literal in wn 1 6 (5) sfa 64 return return return from subroutine 1 6 (5) sfa 65 rlc rlc f f = rotate left through carry f 1 1 c,n,z rlc f,wreg wreg = rotate left through carry f 1 1 c,n,z rlc ws,wd wd = rotate left through carry ws 1 1 c,n,z 66 rlnc rlnc f f = rotate left (no carry) f 1 1 n,z rlnc f,wreg wreg = rotate left (no carry) f 1 1 n,z rlnc ws,wd wd = rotate left (no carry) ws 1 1 n,z 67 rrc rrc f f = rotate right through carry f 1 1 c,n,z rrc f,wreg wreg = rotate right through carry f 1 1 c,n,z rrc ws,wd wd = rotate right through carry ws 1 1 c,n,z 68 rrnc rrnc f f = rotate right (no carry) f 1 1 n,z rrnc f,wreg wreg = rotate right (no carry) f 1 1 n,z rrnc ws,wd wd = rotate right (no carry) ws 1 1 n,z 69 sac sac acc,#slit4,wdo store accumulator 1 1 none sac.r acc,#slit4,wdo store rounded accumulator 1 1 none 70 se se ws,wnd wnd = sign-extended ws 1 1 c,n,z 71 setm setm f f = 0xffff 1 1 none setm wreg wreg = 0xffff 1 1 none setm ws ws = 0xffff 1 1 none 72 sftac sftac acc,wn arithmetic shift accumulator by (wn) 1 1 oa,ob,oab, sa,sb,sab sftac acc,#slit6 arithmetic shift accumulator by slit6 1 1 oa,ob,oab, sa,sb,sab 73 sl sl f f = left shift f 1 1 c,n,ov,z sl f,wreg wreg = left shift f 1 1 c,n,ov,z sl ws,wd wd = left shift ws 1 1 c,n,ov,z sl wb,wns,wnd wnd = left shift wb by wns 1 1 n,z sl wb,#lit5,wnd wnd = left shift wb by lit5 1 1 n,z 74 sub sub acc subtract accumulators 1 1 oa,ob,oab, sa,sb,sab sub f f = f C wreg 1 1 c,dc,n,ov,z sub f,wreg wreg = f C wreg 1 1 c,dc,n,ov,z sub #lit10,wn wn = wn C lit10 1 1 c,dc,n,ov,z sub wb,ws,wd wd = wb C ws 1 1 c,dc,n,ov,z sub wb,#lit5,wd wd = wb C lit5 1 1 c,dc,n,ov,z 75 subb subb f f = f C wreg C (c ) 1 1 c,dc,n,ov,z subb f,wreg wreg = f C wreg C (c ) 1 1 c,dc,n,ov,z subb #lit10,wn wn = wn C lit10 C (c ) 1 1 c,dc,n,ov,z subb wb,ws,wd wd = wb C ws C (c ) 1 1 c,dc,n,ov,z subb wb,#lit5,wd wd = wb C lit5 C (c ) 1 1 c,dc,n,ov,z 76 subr subr f f = wreg C f 1 1 c,dc,n,ov,z subr f,wreg wreg = wreg C f 1 1 c,dc,n,ov,z subr wb,ws,wd wd = ws C wb 1 1 c,dc,n,ov,z subr wb,#lit5,wd wd = lit5 C wb 1 1 c,dc,n,ov,z 77 subbr subbr f f = wreg C f C (c ) 1 1 c,dc,n,ov,z subbr f,wreg wreg = wreg C f C (c ) 1 1 c,dc,n,ov,z subbr wb,ws,wd wd = ws C wb C (c ) 1 1 c,dc,n,ov,z subbr wb,#lit5,wd wd = lit5 C wb C (c ) 1 1 c,dc,n,ov,z table 28-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 336 ? 2013-2015 microchip technology inc. 78 swap swap.b wn wn = nibble swap wn 1 1 none swap wn wn = byte swap wn 1 1 none 79 tblrdh tblrdh ws,wd read prog<23:16> to wd<7:0> 1 5 none 80 tblrdl tblrdl ws,wd read prog<15:0> to wd 1 5 none 81 tblwth tblwth ws,wd write ws<7:0> to prog<23:16> 1 2 none 82 tblwtl tblwtl ws,wd write ws to prog<15:0> 1 2 none 83 ulnk ulnk unlink frame pointer 1 1 sfa 84 xor xor f f = f .xor. wreg 1 1 n,z xor f,wreg wreg = f .xor. wreg 1 1 n,z xor #lit10,wn wd = lit10 .xor. wd 1 1 n,z xor wb,ws,wd wd = wb .xor. ws 1 1 n,z xor wb,#lit5,wd wd = wb .xor. lit5 1 1 n,z 85 ze ze ws,wnd wnd = zero-extend ws 1 1 c,z,n table 28-2: instruction set overview (continued) base instr # assembly mnemonic assembly syntax description # of words # of cycles status flags affected note: read and read-modify-write (e.g., bit operations and logical o perations) on non-cpu sfrs incur an additional instruction cycle. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 337 dspic33evxxxgm00x/10x family 29.0 development support the pic ? microcontrollers (mcu) and dspic ? digital signal controllers (dsc) are supported with a full range of software and hardware development tools: integrated development environment - mplab ? x ide software compilers/assemblers/linkers - mplab xc compiler - mpasm tm assembler -mplink tm object linker/ mplib tm object librarian - mplab assembler/linker/librarian for various device families simulators - mplab x sim software simulator emulators - mplab real ice? in-circuit emulator in-circuit debuggers/programmers - mplab icd 3 - pickit? 3 device programmers - mplab pm3 device programmer low-cost demonstration/development boards, evaluation kits and starter kits third-party development tools 29.1 mplab x integrated development environment software the mplab x ide is a single, unified graphical user interface for microchip and third-party software, and hardware development tool that runs on windows ? , linux and mac os ? x. based on the netbeans ide, mplab x ide is an entirely new ide with a host of free software components and plug-ins for high- performance application development and debugging. moving between tools and upgrading from software simulators to hardware debugging and programming tools is simple with the seamless user interface. with complete project management, visual call graphs, a configurable watch window and a feature-rich editor that includes code completion and context menus, mplab x ide is flexible and friendly enough for new users. with the ability to support multiple tools on multiple projects with simultaneous debugging, mplab x ide is also suitable for the needs of experienced users. feature-rich editor: color syntax highlighting smart code completion makes suggestions and provides hints as you type automatic code formatting based on user-defined rules live parsing user-friendly, customizable interface: fully customizable interface: toolbars, toolbar buttons, windows, window placement, etc. call graph window project-based workspaces: multiple projects multiple tools multiple configurations simultaneous debugging sessions file history and bug tracking: local file history feature built-in support for bugzilla issue tracker downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 338 ? 2013-2015 microchip technology inc. 29.2 mplab xc compilers the mplab xc compilers are complete ansi c compilers for all of microchips 8, 16, and 32-bit mcu and dsc devices. these compilers provide powerful integration capabilities, superior code optimization and ease of use. mplab xc compilers run on windows, linux or mac os x. for easy source level debugging, the compilers provide debug information that is optimized to the mplab x ide. the free mplab xc compiler editions support all devices and commands, with no time or memory restrictions, and offer sufficient code optimization for most applications. mplab xc compilers include an assembler, linker and utilities. the assembler generates relocatable object files that can then be archived or linked with other relo- catable object files and archives to create an execut- able file. mplab xc compiler uses the assembler to produce its object file. notable features of the assem- bler include: support for the entire device instruction set support for fixed-point and floating-point data command-line interface rich directive set flexible macro language mplab x ide compatibility 29.3 mpasm assembler the mpasm assembler is a full-featured, universal macro assembler for pic10/12/16/18 mcus. the mpasm assembler generates relocatable object files for the mplink object linker, intel ? standard hex files, map files to detail memory usage and symbol reference, absolute lst files that contain source lines and generated machine code, and coff files for debugging. the mpasm assembler features include: integration into mplab x ide projects user-defined macros to streamline assembly code conditional assembly for multipurpose source files directives that allow complete control over the assembly process 29.4 mplink object linker/ mplib object librarian the mplink object linker combines relocatable objects created by the mpasm assembler. it can link relocatable objects from precompiled libraries, using directives from a linker script. the mplib object librarian manages the creation and modification of library files of precompiled code. when a routine from a library is called from a source file, only the modules that contain that routine will be linked in with the application. this allows large libraries to be used efficiently in many different applications. the object linker/library features include: efficient linking of single libraries instead of many smaller files enhanced code maintainability by grouping related modules together flexible creation of libraries with easy module listing, replacement, deletion and extraction 29.5 mplab assembler, linker and librarian for various device families mplab assembler produces relocatable machine code from symbolic assembly language for pic24, pic32 and dspic dsc devices. mplab xc compiler uses the assembler to produce its object file. the assembler generates relocatable object files that can then be archived or linked with other relocatable object files and archives to create an executable file. notable features of the assembler include: support for the entire device instruction set support for fixed-point and floating-point data command-line interface rich directive set flexible macro language mplab x ide compatibility downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 339 dspic33evxxxgm00x/10x family 29.6 mplab x sim software simulator the mplab x sim software simulator allows code development in a pc-hosted environment by simulat- ing the pic mcus and dspic dscs on an instruction level. on any given instruction, the data areas can be examined or modified and stimuli can be applied from a comprehensive stimulus controller. registers can be logged to files for further run-time analysis. the trace buffer and logic analyzer display extend the power of the simulator to record and track program execution, actions on i/o, most peripherals and internal registers. the mplab x sim software simulator fully supports symbolic debugging using the mplab xc compilers, and the mpasm and mplab assemblers. the soft- ware simulator offers the flexibility to develop and debug code outside of the hardware laboratory envi- ronment, making it an excellent, economical software development tool. 29.7 mplab real ice in-circuit emulator system the mplab real ice in-circuit emulator system is microchips next generation high-speed emulator for microchip flash dsc and mcu devices. it debugs and programs all 8, 16 and 32-bit mcu, and dsc devices with the easy-to-use, powerful graphical user interface of the mplab x ide. the emulator is connected to the design engineers pc using a high-speed usb 2.0 interface and is connected to the target with either a connector compatible with in-circuit debugger systems (rj-11) or with the new high-speed, noise tolerant, low- voltage differential signal (lvds) interconnection (cat5). the emulator is field upgradable through future firmware downloads in mplab x ide. mplab real ice offers significant advantages over competitive emulators including full-speed emulation, run-time variable watches, trace analysis, complex breakpoints, logic probes, a ruggedized probe interface and long (up to three meters) interconnection cables. 29.8 mplab icd 3 in-circuit debugger system the mplab icd 3 in-circuit debugger system is microchips most cost-effective, high-speed hardware debugger/programmer for microchip flash dsc and mcu devices. it debugs and programs pic flash microcontrollers and dspic dscs with the powerful, yet easy-to-use graphical user interface of the mplab ide. the mplab icd 3 in-circuit debugger probe is connected to the design engineers pc using a high- speed usb 2.0 interface and is connected to the target with a connector compatible with the mplab icd 2 or mplab real ice systems (rj-11). mplab icd 3 supports all mplab icd 2 headers. 29.9 pickit 3 in-circuit debugger/ programmer the mplab pickit 3 allows debugging and program- ming of pic and dspic flash microcontrollers at a most affordable price point using the powerful graphical user interface of the mplab ide. the mplab pickit 3 is connected to the design engineers pc using a full- speed usb interface and can be connected to the tar- get via a microchip debug (rj-11) connector (compati- ble with mplab icd 3 and mplab real ice). the connector uses two device i/o pins and the reset line to implement in-circuit debugging and in-circuit serial programming? (icsp?). 29.10 mplab pm3 device programmer the mplab pm3 device programmer is a universal, ce compliant device programmer with programmable voltage verification at v ddmin and v ddmax for maximum reliability. it features a large lcd display (128 x 64) for menus and error messages, and a mod- ular, detachable socket assembly to support various package types. the icsp cable assembly is included as a standard item. in stand-alone mode, the mplab pm3 device programmer can read, verify and program pic devices without a pc connection. it can also set code protection in this mode. the mplab pm3 connects to the host pc via an rs-232 or usb cable. the mplab pm3 has high-speed communications and optimized algorithms for quick programming of large memory devices, and incorporates an mmc card for file storage and data applications. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 340 ? 2013-2015 microchip technology inc. 29.11 demonstration/development boards, evaluation kits, and starter kits a wide variety of demonstration, development and evaluation boards for various pic mcus and dspic dscs allows quick application development on fully functional systems. most boards include prototyping areas for adding custom circuitry and provide applica- tion firmware and source code for examination and modification. the boards support a variety of features, including leds, temperature sensors, switches, speakers, rs-232 interfaces, lcd displays, potentiometers and additional eeprom memory. the demonstration and development boards can be used in teaching environments, for prototyping custom circuits and for learning about various microcontroller applications. in addition to the picdem? and dspicdem? demonstration/development board series of circuits, microchip has a line of evaluation kits and demonstra- tion software for analog filter design, k ee l oq ? security ics, can, irda ? , powersmart battery management, seeval ? evaluation system, sigma-delta adc, flow rate sensing, plus many more. also available are starter kits that contain everything needed to experience the specified device. this usually includes a single application and debug capability, all on one board. check the microchip web page ( www.microchip.com ) for the complete list of demonstration, development and evaluation kits. 29.12 third-party development tools microchip also offers a great collection of tools from third-party vendors. these tools are carefully selected to offer good value and unique functionality. device programmers and gang programmers from companies, such as softlog and ccs software tools from companies, such as gimpel and trace systems protocol analyzers from companies, such as saleae and total phase demonstration boards from companies, such as mikroelektronika, digilent ? and olimex embedded ethernet solutions from companies, such as ez web lynx, wiznet and iplogika ? downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 341 dspic33evxxxgm00x/10x family 30.0 electrical characteristics this section provides an overview of dspic33evxxxgm00x /10x family electrical characteristics. additional information will be provided in future revisions of this document as it becomes available. absolute maximum ratings for the dspic33evxxxgm00x/10x family are listed below. exposure to these maximum rating conditions for extended periods may affect device reliability. functional operation of the device at these or any other conditions above the parameters indicated in the operation listings of this specification is not implied. absolute maximum ratings ( 1 ) ambient temperature under bias................................................................................................. ............-40c to +125c storage temperature ............................................................................................................ .................. -65c to +160c voltage on v dd with respect to v ss .......................................................................................................... -0.3v to +6.0v voltage on v cap with respect to v ss ........................................................................................................ 1.62v to 1.98v maximum current out of v ss pin ........................................................................................................................... 350 ma maximum current into v dd pin ( 2 ) ...........................................................................................................................350 ma maximum current sunk by any i/o pin............................................................................................ .........................20 ma maximum current sourced by i/o pin ......................................................................................................................18 ma maximum current sourced/sunk by all ports ( 2 ) ......................................................................................................200 ma note 1: stresses above those listed under absolute maximum ratings may cause permanent damage to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operational listings of this specification is not implied. exposure to maximum rating conditions for extended periods may affect device reliability. 2: maximum allowable current is a function of device maximum power dissipation (see tab l e 3 0- 2 ). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 342 ? 2013-2015 microchip technology inc. 30.1 dc characteristics table 30-1: operating mips vs. voltage characteristic v dd range (in volts) temperature range (in c) maximum mips dspic33evxxxgm00x/10x family i-temp 4.5v to 5.5v ( 1 , 2 ) -40c to +85c 70 e-temp 4.5v to 5.5v ( 1 , 2 ) -40c to +125c 60 note 1: device is functional at v bormin < v dd < v ddmin . analog modules: adc, op amp/comparator and comparator voltage reference will have degraded performance. device functionality is tested but not characterized. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. 2: when bor is enabled, the device will work from 4.7v to 5.5v. note 1: customer operating voltage range is specified as: 4.5v to 5.5v. table 30-2: thermal operating conditions rating symbol min. typ. max. unit industrial temperature devices: operating junction temperature range t j -40 +125 c operating ambient temperature range t a -40 +85 c extended temperature devices: operating junction temperature range t j -40 +140 c operating ambient temperature range t a -40 +125 c power dissipation: internal chip power dissipation: p int = v dd x (i dd C ? i oh ) p d p int + p i / o w i/o pin power dissipation: i/o = ? ({v dd C v oh } x i oh ) + ? (v ol x i ol ) maximum allowed power dissipation p dmax (t j C t a )/ ? ja w table 30-3: thermal packaging characteristics characteristic symbol typ. max. unit notes package thermal resistance, 64-pin qfn, 9x9x0.9 mm ? ja 28.0 c/w 1 package thermal resistance, 64-pin tqfp, 10x10x1 mm ? ja 48.3 c/w 1 package thermal resistance, 44-pin qfn, 8x8 mm ? ja 29.0 c/w 1 package thermal resistance, 44-pin tqfp, 10x10x1 mm ? ja 49.8 c/w 1 package thermal resistance, 28-pin qfn-s, 6x6x0.9 mm ? ja 30.0 c/w 1 package thermal resistance, 28-pin soic, 7.50 mm ? ja 69.7 c/w 1 package thermal resistance, 28-pin spdip, 300 mil ? ja 60.0 c/w 1 note 1: junction to ambient thermal resistance, theta- ja ( ? ja ) numbers are achieved by package simulations. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 343 dspic33evxxxgm00x/10x family table 30-5: filter capacitor (c efc ) specifications table 30-4: dc temperature and voltage specifications dc characteristics standard operating conditions (see note 3 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. units conditions operating voltage dc10 v dd supply voltage ( 3 ) v bor 5 . 5v dc12 v dr ram data retention voltage ( 2 ) 1.8 v dc16 v por v dd start voltage to ensure internal power-on reset signal v ss v dc17 s vdd v dd rise rate to ensure internal power-on reset signal 1.0 v/ms 0v-5.0v in 5 ms dc18 v core v dd core internal regulator voltage 1.62 1.8 1.98 v voltage is dependent on load, temperature and v dd note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. 2: this is the limit to which v dd may be lowered without losing ram data. 3: v dd voltage must remain at v ss for a minimum of 200 ? s to ensure por. standard operating conditions (unless otherwise stated): operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristics min. typ. max. units comments c efc external filter capacitor value ( 1 ) 4.7 10 ? f capacitor must have a low series resistance (< 1 ? ) note 1: typical v cap voltage = 1.8 volts when v dd ? v ddmin . downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 344 ? 2013-2015 microchip technology inc. table 30-6: dc characteristics: operating current (i dd ) dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. typ. ( 2 ) max. units conditions operating current (i dd ) ( 1 ) dc20d 4.5 5.5 ma -40c 5.0v 10 mips dc20a 4.65 5.6 ma +25c dc20b 4.85 6.0 ma +85c dc20c 5.6 7.2 ma +125c dc22d 8.6 10.6 ma -40c 5.0v 20 mips dc22a 8.8 10.8 ma +25c dc22b 9.1 11.1 ma +85c dc22c 9.8 12.6 ma +125c dc23d 16.8 18.5 ma -40c 5.0v 40 mips dc23a 17.2 19.0 ma +25c dc23b 17.55 19.2 ma +85c dc23c 18.3 21.0 ma +125c dc24d 25.15 28.0 ma -40c 5.0v 60 mips dc24a 25.5 28.0 ma +25c dc24b 25.5 28.0 ma +85c dc24c 25.55 28.5 ma +125c dc25d 29.0 31.0 ma -40c 5.0v 70 mips dc25a 28.5 31.0 ma +25c dc25b 28.3 31.0 ma +85c note 1: i dd is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current consumption. the test conditions for all i dd measurements are as follows: oscillator is configured in ec mode and external clock is active, osc1 is dri ven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) clko is configured as an i/o input pin in the configuration word all i/o pins are configured as outputs and driving low mclr = v dd , wdt and fscm are disabled cpu, sram, program memory and data memory are operational no peripheral modules are operating or being clocked (defined pmdx bits are all ones) cpu executing while(1) { nop() ; } 2: data in typ. column is at 5.0v, +25c unless otherwise stated. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 345 dspic33evxxxgm00x/10x family table 30-7: dc characteristics: idle current (i idle ) dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typ. ( 2 ) max. units conditions idle current (i idle ) ( 1 ) dc40d 1.25 1.45 ma -40c 5.0v 10 mips dc40a 1.25 1.45 ma +25c dc40b 1.5 2.6 ma +85c dc40c 1.5 2.6 ma +125c dc42d 2.3 2.6 ma -40c 5.0v 20 mips dc42a 2.3 2.6 ma +25c dc42b 2.6 3.45 ma +85c dc42c 2.6 3.85 ma +125c dc44d 6.9 7.5 ma -40c 5.0v 70 mips dc44a 6.9 7.5 ma +25c dc44b 7.25 8.6 ma +85c note 1: base idle current (i idle ) is measured as follows: cpu core is off, oscillator is configured in ec mode and external clock is active, osc1 is dr iven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) clko is configured as an i/o input pin in the configuration word all i/o pins are configured as outputs and driving low mclr = v dd , wdt and fscm are disabled no peripheral modules are operating or being clocked (defined pmdx bits are all ones) the nvmsidl bit (nvmcon<12>) = 1 (i.e., flash regulator is set to standby while the device is in idle mode) the vregsf bit (rcon<11>) = 0 (i.e., flash regulator is set to standby while the device is in sleep mode) 2: data in typ. column is at 5.0v, +25c unless otherwise stated. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 346 ? 2013-2015 microchip technology inc. table 30-8: dc characteristics: power-down current (i pd ) dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typ. ( 2 ) max. units conditions power-down current (i pd ) C dspic33evxxxgm00x/10x ( 1 ) dc60d 9.25 30 ? a- 4 0 c 5.0v base power-down current dc60a 15.75 35 ? a+ 2 5 c dc60b 67.75 250 ? a+ 8 5 c dc60c 270 750 ? a +125c dc61d 1 7 ? a- 4 0 c 5.0v watchdog timer current: ? i wdt ( 3 ) dc61a 1.25 8 ? a+ 2 5 c dc61b 3.5 12 ? a+ 8 5 c dc61c 5 15 ? a +125c note 1: i pd (sleep) current is measured as follows: cpu core is off, oscillator is configured in ec mode and external clock is active, osc1 is dr iven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) clko is configured as an i/o input pin in the configuration word all i/o pins are configured as outputs and driving low mclr = v dd , wdt and fscm are disabled all peripheral modules are disabled (pmdx bits are all ones) the vregs bit (rcon<8>) = 0 (i.e., core regulator is set to standby while the device is in sleep mode) the vregsf bit (rcon<11>) = 0 (i.e., flash regulator is set to standby while the device is in sleep mode) 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the ? current is the additional current consumed when the module is enabled. this current should be added to the base i pd current. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 347 dspic33evxxxgm00x/10x family table 30-9: dc characteristics: doze current (i doze ) dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended parameter no. typ. ( 2 ) max. doze ratio units conditions doze current (i doze ) ( 1 ) dc73a 16.0 17.7 1:2 ma -40c 5.0v 70 mips dc73g 7.1 7.57 1:128 ma dc70a 16.25 17.95 1:2 ma +25c 5.0v 70 mips dc70g 7.3 7.77 1:128 ma dc71a 17.0 18.7 1:2 ma +85c 5.0v 70 mips dc71g 7.5 8.1 1:128 ma dc72a 17.75 19.95 1:2 ma +125c 5.0v 60 mips dc72g 8.25 9.32 1:128 ma note 1: i doze is primarily a function of the operating voltage and frequency. other factors, such as i/o pin loading and switching rate, oscillator type, internal code execution pattern and temperature, also have an impact on the current consumption. the test conditions for all i doze measurements are as follows: oscillator is configured in ec mode and external clock is active, osc 1 is driven with external square wave from rail-to-rail (ec clock overshoot/undershoot < 250 mv required) clko is configured as an i/o input pin in the configuration word all i/o pins are configured as outputs and driving low mclr = v dd , wdt and fscm are disabled cpu, sram, program memory and data memory are operational no peripheral modules are operating or being clocked (defined pmdx bits are all ones) cpu executing while(1) { nop() ; } 2: data in typ. column is at 5.0v, +25c unless otherwise stated. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 348 ? 2013-2015 microchip technology inc. table 30-10: dc characteristics: i/o pin input specifications dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. unit s conditions v il input low voltage di10 i/o pins v ss 0 . 2v dd v v ih input high voltage di20 i/o pins 0.75 v dd 5 . 5v i cnpu change notification pull-up current di30 200 375 600 ? av dd = 5.0v, v pin = v ss i cnpd change notification pull-down current ( 7 ) di31 175 400 625 ? av dd = 5.0v, v pin = v dd i il input leakage current ( 2 , 3 ) di50 i/o pins -100 100 na v ss ? v pin ? v dd , pin at high-impedance di55 mclr -700 700 na v ss ?? v pin ?? v dd di56 osc1 -200 200 na v ss ?? v pin ?? v dd , xt and hs modes i icl input low injection current di60a 0 -5 ( 4 , 6 ) ma all pins except v dd , v ss , av dd , av ss , mclr , v cap and rb7 i ich input high injection current di60b 0 +5 ( 5 , 6 ) ma all pins except v dd , v ss , av dd , av ss , mclr , v cap , rb7 and all 5v tolerant pins ( 5 ) ? i ict total input injection current di60c (sum of all i/o and control pins) -20 ( 7 ) + 2 0 ( 7 ) ma absolute instantaneous sum of all input injection currents from all i/o pins ( | ii cl |+ | i ich |) ? ? i ict note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. 2: the leakage current on the mclr pin is strongly dependent on the applied voltage level. the specified levels represent normal operating conditions. higher leakage current can be measured at different input voltages. 3: negative current is defined as current sourced by the pin. 4: v il source < (v ss C 0.3). characterized but not tested. 5: digital 5v tolerant pins cannot tolerate any positive input injectio n current from input sources > 5.5v. 6: non-zero injection currents can affect the adc results by approximately 4-6 counts. 7: any number and/or combination of i/o pins not excluded under i icl or i ich conditions are permitted, provided the mathematical absolute instantaneous sum of the input injection currents from all pins do n ot exceed the specified limit. characterized but not tested. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 349 dspic33evxxxgm00x/10x family table 30-11: dc characteristics: i/o pin output specifications dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic min. ( 1 ) typ. max. units conditions do16 v ol output low voltage 4x sink driver pins ( 2 ) 0 . 4vi ol = 8.8 ma, v dd = 5.0v do10 v ol output low voltage 8x sink driver pins ( 3 ) 0 . 4vi ol = 10.8 ma, v dd = 5.0v do26 v oh output high voltage 4x sink driver pins ( 2 ) v dd C 0.6 v i oh = -8.3 ma, v dd = 5.0v do20 v oh output high voltage 8x sink driver pins v dd C 0.6 v i oh = -12.3 ma, v dd = 5.0v note 1: parameters are characterized, but not tested. 2: includes all i/o pins that are not 8x sink driver pins (see below). 3: includes pins, such as ra3, ra4 and rb<15:10> for 28-pin devices, ra3, ra4, ra9 and rb<15:10> for 44-pin devices and ra4, ra7, ra9, rb<15:10> and rc15 for 64-pin devices. table 30-12: electrical characteristics: bor dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. ( 1 ) typ. max. units conditions bo10 v bor bor event on v dd transition high-to-low 4.15 4.285 4.4 v v dd (see note 2 , note 3 and note 4 ) note 1: parameters are for design guidance only and are not tested in manufacturing. 2: the v bor specification is relative to the v dd . 3: the device is functional at v bormin < v dd < v ddmin . analog modules: adc, op amp/comparator and comparator voltage reference will have degraded performance. device functionality is tested but not characterized. 4: the start-up v dd must rise above 4.6v. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 350 ? 2013-2015 microchip technology inc. table 30-13: dc characteristics: program memory dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min typ. ( 1 ) max units conditions program flash memory d130 e p cell endurance 10,000 e/w -40 ? c to +125 ? c d131 v pr v dd for read 4.5 5.5 v d132b v pew v dd for self-timed write 4.5 5.5 v d134 t retd characteristic retention 20 year provided no other specifications are violated, -40 ? c to +125 ? c d135 i ddp supply current during programming 1 0m a d136a t rw row write cycle time 0.657 0.691 ms t rw = 4965 frc cycles, t a = +85c (see note 2 ) d136b t rw row write cycle time 0.651 0.698 ms t rw = 4965 frc cycles, t a = +125c (see note 2 ) d137a t pe page erase time 19.44 20.44 ms t pe = 146893 frc cycles, t a = +85c (see note 2 ) d137b t pe page erase time 19.24 20.65 ms t pe = 146893 frc cycles, t a = +125c (see note 2 ) d138a t ww word write cycle time 45.78 48.15 s t ww = 346 frc cycles, t a = +85c (see note 2 ) d138b t ww word write cycle time 45.33 48.64 s t ww = 346 frc cycles, t a = +125c (see note 2 ) note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. 2: other conditions: frc = 7.3728 mhz, tun<5:0> = b'011111 (for min), tun<5:0> = b'100000 (for max). this parameter depends on the frc accuracy (see table 30-19 ) and the value of the frc oscillator tuning register. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 351 dspic33evxxxgm00x/10x family 30.2 ac characteristics and timing parameters this section defines the dspic33evxxxgm00x/10x family ac characteristics and timing parameters. table 30-14: temperature and vo ltage specifications C ac figure 30-1: load conditions fo r device timing specifications table 30-15: capacitiv e loading requirements on output pins ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended operating voltage v dd range as described in section 30.1 dc characteristics . param no. symbol characteristic min. typ. max. units conditions do50 c osco osc2 pin 15 pf in xt and hs modes, when external clock is used to drive osc1 do56 c io all i/o pins and osc2 50 pf ec mode do58 c b sclx, sdax 400 pf in i 2 c? mode v dd /2 c l r l pin pin v ss v ss c l r l =464 ? c l = 50 pf for all pins except osc2 15 pf for osc2 output load condition 1 C for all pins except osc2 load condition 2 C for osc2 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 352 ? 2013-2015 microchip technology inc. figure 30-2: extern al clock timing q1 q2 q3 q4 osc1 clko q1 q2 q3 q4 os20 os30 os30 os40 os41 os31 os31 os25 table 30-16: external clo ck timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. sym characteristic min. typ. ( 1 ) max. units conditions os10 f in external clki frequency (external clocks allowed only in ec and ecpll modes) dc 40 mhz ec oscillator crystal frequency 3.5 10 1025 mhzmhz xths os20 t osc t osc = 1/f osc 12.5 dc ns t a = +125c os25 t cy instruction cycle time ( 2 ) 25 dc ns t a = +125c os30 tosl, to s h external clock in (osc1) high or low time 0.375 x t osc 0.625 x t osc ns ec os31 tosr, to s f external clock in (osc1) rise or fall time 20 ns ec os40 tckr clko rise time ( 3 ) 5 . 2n s os41 tckf clko fall time ( 3 ) 5 . 2n s os42 g m external oscillator transconductance ( 4 ) 12 ma/v hs, v dd = 5.0v, t a = +25c 6m a / v x t , v dd = 5.0v, t a = +25c note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. 2: instruction cycle period (t cy ) equals two times the input oscillator time base period. all specified values are based on characterization data for that particular oscillator type, under standard operating condition s, with the device executing code. exceeding these specified limits may result in an unstable oscillator operation and/or higher than expected current consumption. all devices are tested to operate at minimum values with an external clock applied to the osc1 pin. when an ex ternal clock input is used, the maximum cycle time limit is dc (no clock) for all devices. 3: measurements are taken in ec mode. the clko signal is measured on the osc2 pin. 4: this parameter is characterized but not tested in manufacturing. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 353 dspic33evxxxgm00x/10x family table 30-17: pll clock timing specifications ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. units conditions os50 f plli pll voltage controlled oscillator (vco) input frequency range 0.8 8.0 mhz ecpll, xtpll modes os51 f sys on-chip vco system frequency 120 340 mhz os52 t lock pll start-up time (lock time) 0.9 1.5 3.1 ms os53 d clk clko stability (jitter) ( 2 ) -3 0.5 3 % note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. parameters are for design guidance only and are not tested. 2: this jitter specification is based on clock cycle-by-clock cycle measurements. to get the effectiv e jitter for individual time bases or communication clocks used by the application, use the following formula: for example, if f osc = 120 mhz and the spi bit rate = 10 mhz, the effective jitter is as follows: effective jitter d clk f osc time base or communication clock -------------------------------------------------------------------------------------- - ------------------------------------------------------------------------------------------- = effective jitter d clk 120 10 -------- - ------------- - d clk 12 ------------- - d clk 3.464 ------------- - === table 30-18: internal frc accuracy ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min. typ. max. units conditions internal frc accuracy @ frc frequency = 7.37 mhz ( 1 ) f20a frc -1 0.5 +1 % -40c ? t a ?? +85c v dd = 4.5-5.5v f20b frc -2 1 +2 % -40c ? t a ? +125c v dd = 4.5-5.5v note 1: frequency calibrated at +25c and 5.0v. tun<5:0> bits can be used to compensate for temperature drift. table 30-19: internal lprc accuracy ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min. typ. max. units conditions lprc @ 32.768 khz ( 1 ) f21a lprc -15 5 +15 % -40c ? t a ? +85c v dd = 4.5-5.5v f21b lprc -30 10 +30 % -40c ? t a ? +125c v dd = 4.5-5.5v note 1: change of lprc frequency as v dd changes. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 354 ? 2013-2015 microchip technology inc. figure 30-3: i/o timi ng characteristics figure 30-4: bor and master cle ar reset timing characteristics note: refer to figure 30-1 for load conditions. i/o pin (input) i/o pin (output) di35 old value new value di40 do31 do32 table 30-20: i/o timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. units conditions do31 t io r port output rise time 5 10 ns do32 t io f port output fall time 5 10 ns di35 t inp intx pin high or low time (input) 20 ns di40 t rbp cnx high or low time (input) 2 t cy note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. mclr (sy20) bor (sy30) t mclr t bor reset sequence cpu starts fetching code various delays (depending on configuration) downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 355 dspic33evxxxgm00x/10x family figure 30-5: power-on rese t timing characteristics note 1: the power-up period will be extended if the power-up sequence completes before the device exits from bor (v dd < v bor ). 2: the power-up period includes internal voltage regulator stabilization delay. v dd v por sy11 power-up sequence (notes 1,2) cpu starts fetching code (t pwrt ) power-up timer C clock sources = (frc, frcdivn, frcdiv16, frcpll, ec, ecpll and lprc) sy00 (t pu ) v dd v por greater of power-up sequence (notes 1,2) cpu starts fetching code power-up timer C clock sources = (hs, hspll, xt and xtpll) sy00 (t pu ) sy11 (t pwrt ) sy10 (t ost ) or downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 356 ? 2013-2015 microchip technology inc. table 30-21: reset, watchdog timer, os cillator start-up timer and power-up timer timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sy00 t pu power-up period 400 600 s sy10 t ost oscillator start-up time 1024t osc t osc = osc1 period sy11 t pwrt power-up timer period 1 ms using lprc parameters indicated in f21a / f21b (see table 30-19 ) sy12 t wdt watchdog timer time-out period 0.8 1.2 ms wdtpre = 0 , wdtps<3:0> = 0000 , using lprc tolerances indicated in f21a / f21b (see table 30-19 ) at +85c 3.2 4.8 ms wdtpre = 1 , wdtps<3:0> = 0000 , using lprc tolerances indicated in f21a / f21b (see table 30-19 ) at +85c sy13 t ioz i/o high-impedance from mclr low or watchdog timer reset 0.68 0.72 1.2 s sy20 t mclr mclr pulse width (low) 2 s sy30 t bor bor pulse width (low) 1m s sy35 t fscm fail-safe clock monitor delay 500 900 s -40c to +85c sy36 t vreg voltage regulator standby-to-active mode transition time 3 0 s sy37 t oscdfrc frc oscillator start-up delay 46 48 54 s sy38 t oscdlprc lprc oscillator start-up delay 7 0 s note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 357 dspic33evxxxgm00x/10x family figure 30-6: timer1-timer5 externa l clock timing characteristics note: refer to figure 30-1 for load conditions. os60 txck tmrx tx10 tx11 tx15 tx20 table 30-22: timer1 external clock timing requirements ( 1 ) ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 2 ) min. typ. max. units conditions ta10 t tx h t1ck high time synchronous mode greater of: 20 or (t cy + 20)/n ns must also meet parameter ta15, n = prescaler value (1, 8, 64, 256) asynchronous mode 35 ns ta11 t tx lt 1 c k l o w time synchronous mode greater of: 20 or (t cy + 20)/n ns must also meet parameter ta15, n = prescaler value (1, 8, 64, 256) asynchronous mode 10 ns ta15 t tx p t1ck input period synchronous mode greater of: 40 or (2 t cy + 40)/n ns n = prescaler value (1, 8, 64, 256) os60 ft1 t1ck oscillator input frequency range (oscillator enabled by setting tcs (t1con<1>) bit) dc 50 khz ta20 t ckextmrl delay from external t1ck clock edge to timer increment 0.75 t cy + 40 1.75 t cy + 40 ns note 1: timer1 is a type a. 2: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 358 ? 2013-2015 microchip technology inc. table 30-23: timer2 and timer4 (type b timer) external clock timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions tb10 t tx ht x c k h i g h time synchronous mode greater of: 20 or (t cy + 20)/n ns must also meet parameter tb15, n = prescaler value (1, 8, 64, 256) tb11 t tx lt x c k l o w time synchronous mode greater of: 20 or (t cy + 20)/n ns must also meet parameter tb15, n = prescaler value (1, 8, 64, 256) tb15 t tx p txck input period synchronous mode greater of: 40 or (2 t cy + 40)/n ns n = prescaler value (1, 8, 64, 256) tb20 t ckextmrl delay from external txck clock edge to timer increment 0.75 t cy + 40 1.75 t cy + 40 ns note 1: these parameters are characterized but not tested in manufacturing. table 30-24: timer3 and timer5 (type c timer) external clock timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions tc10 t tx ht x c k h i g h time synchronous t cy + 20 ns must also meet parameter tc15 tc11 t tx l txck low time synchronous t cy + 20 ns must also meet parameter tc15 tc15 t tx p txck input period synchronous, with prescaler 2 t cy + 40 ns n = prescaler value (1, 8, 64, 256) tc20 t ckextmrl delay from external txck clock edge to timer increment 0.75 t cy + 40 1.75 t cy + 40 ns note 1: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 359 dspic33evxxxgm00x/10x family figure 30-7: input capture x (icx) timing characteristics icx ic10 ic11 ic15 note 1: refer to figure 30-1 for load conditions. table 30-25: input capture x (icx) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. no. symbol characteristics ( 1 ) min. max. units conditions ic10 t cc l icx input low time greater of: 12.5 + 25 or (0.5 t cy /n) + 25 ns must also meet parameter ic15 n = prescaler value (1, 4, 16) ic11 t cc h icx input high time greater of: 12.5 + 25 or (0.5 t cy /n) + 25 ns must also meet parameter ic15 ic15 t cc p icx input period greater of: 25 + 50 or (1 t cy /n) + 50 n s note 1: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 360 ? 2013-2015 microchip technology inc. figure 30-8: output compare x (ocx) timing characteristics figure 30-9: ocx/pwmx module timing characteristics ocx oc11 oc10 (output compare note: refer to figure 30-1 for load conditions. or pwm mode) table 30-26: output compare x (ocx) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions oc10 t cc f ocx output fall time ns see parameter do32 oc11 t cc r ocx output rise time ns see parameter do31 note 1: these parameters are characterized but not tested in manufacturing. ocfa ocx oc20 oc15 table 30-27: ocx/pwmx mode timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions oc15 t fd fault input to pwmx i/o change t cy + 20 ns oc20 t flt fault input pulse width t cy + 20 ns note 1: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 361 dspic33evxxxgm00x/10x family figure 30-10: high-speed pwmx mo dule fault timing characteristics figure 30-11: high-speed pwmx module timing characteristics fault input pwmx mp30 mp20 (active-low) pwmx mp11 mp10 note: refer to figure 30-1 for load conditions. table 30-28: high-speed pwmx module timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions mp10 t fpwm pwmx output fall time ns see parameter do32 mp11 t rpwm pwmx output rise time ns see parameter do31 mp20 t fd fault input ? to pwmx i/o change 1 5n s mp30 t fh fault input pulse width 15 ns note 1: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 362 ? 2013-2015 microchip technology inc. table 30-29: spi2 maximu m data/clock rate summary figure 30-12: spi2 master mode (half-duplex, transmit only, cke = 0 ) timing characteristics ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended maximum data rate master transmit only (half-duplex) master transmit/receive (full-duplex) slave transmit/receive (full-duplex) cke ckp smp 15 mhz table 30-30 0 , 10 , 10 , 1 9 mhz table 30-31 10 , 11 9 mhz table 30-32 00 , 11 15 mhz table 30-33 100 11 mhz table 30-34 110 15 mhz table 30-35 010 11 mhz table 30-36 000 sck2 (ckp = 0 ) sck2 (ckp = 1 ) sdo2 sp10 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 30-1 for load conditions. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 363 dspic33evxxxgm00x/10x family figure 30-13: spi2 master mode ( half-duplex, transmit only, cke = 1 ) timing characteristics table 30-30: spi2 master mode (half-duple x, transmit only) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck2 frequency 15 mhz see note 3 sp20 tscf sck2 output fall time ns see parameter do32 and note 4 sp21 tscr sck2 output rise time ns see parameter do31 and note 4 sp30 tdof sdo2 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo2 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo2 data output valid after sck2 edge 62 0n s sp36 tdiv2sch, tdiv2scl sdo2 data output setup to first sck2 edge 30 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck2 is 66.7 ns. therefore, the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi2 pins. sck2 (ckp = 0 ) sck2 (ckp = 1 ) sdo2 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 30-1 for load conditions. sp36 sp10 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 364 ? 2013-2015 microchip technology inc. figure 30-14: spi2 master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing characteristics table 30-31: spi2 master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck2 frequency 9 mhz see note 3 sp20 tscf sck2 output fall time ns see parameter do32 and note 4 sp21 tscr sck2 output rise time ns see parameter do31 and note 4 sp30 tdof sdo2 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo2 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo2 data output valid after sck2 edge 62 0n s sp36 tdov2sc, tdov2scl sdo2 data output setup to first sck2 edge 3 0 n s sp40 tdiv2sch, tdiv2scl setup time of sdi2 data input to sck2 edge 3 0 n s sp41 tsch2dil, ts c l 2 d i l hold time of sdi2 data input to sck2 edge 3 0 n s note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck2 is 111 ns. the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi2 pins. sck2 (ckp = 0 ) sck2 (ckp = 1 ) sdo2 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 30-1 for load conditions. sp36 sp41 lsb in bit 14 - - - -1 sdi2 sp40 msb in sp10 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 365 dspic33evxxxgm00x/10x family figure 30-15: spi2 master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing characteristics table 30-32: spi2 master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck2 frequency 9 mhz -40oc to +125oc and see note 3 sp20 tscf sck2 output fall time ns see parameter do32 and note 4 sp21 tscr sck2 output rise time ns see parameter do31 and note 4 sp30 tdof sdo2 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo2 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo2 data output valid after sck2 edge 62 0n s sp36 tdov2sch, tdov2scl sdo2 data output setup to first sck2 edge 3 0 n s sp40 tdiv2sch, tdiv2scl setup time of sdi2 data input to sck2 edge 3 0 n s sp41 tsch2dil, ts c l 2 d i l hold time of sdi2 data input to sck2 edge 3 0 n s note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck2 is 111 ns. the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi2 pins. sck2 (ckp = 0 ) sck2 (ckp = 1 ) sdo2 sdi2 sp40 sp41 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 lsb in bit 14 - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 30-1 for load conditions. sp36 sp10 msb in downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 366 ? 2013-2015 microchip technology inc. figure 30-16: spi2 slave mode (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing characteristics ss2 sck2 (ckp = 0 ) sck2 (ckp = 1 ) sdo2 sp60 sdi2 sp30, sp31 msb bit 14 - - - - - -1 lsb sp51 bit 14 - - - -1 lsb in sp35 sp52 sp73 sp72 sp72 sp73 sp40 sp41 note: refer to figure 30-1 for load conditions. sp36 sp50 msb in sp70 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 367 dspic33evxxxgm00x/10x family table 30-33: spi2 slave mo de (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck2 input frequency 15 mhz see note 3 sp72 tscf sck2 input fall time ns see parameter do32 and note 4 sp73 tscr sck2 input rise time ns see parameter do31 and note 4 sp30 tdof sdo2 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo2 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo2 data output valid after sck2 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo2 data output setup to first sck2 edge 30 ns sp40 tdiv2sch, tdiv2scl setup time of sdi2 data input to sck2 edge 30 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi2 data input to sck2 edge 30 ns sp50 tssl2sch, tssl2scl ss2 ? to sck2 ? or sck2 ?? input 120 ns sp51 tssh2doz ss2 ? to sdo2 output high-impedance 10 50 ns see note 4 sp52 tsch2ssh tscl2ssh ss2 ?? after sck2 edge 1.5 t cy + 40 ns see note 4 sp60 tssl2dov sdo2 data output valid after ss2 edge 50 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck2 is 66.7 ns. therefore, the sck2 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi2 pins. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 368 ? 2013-2015 microchip technology inc. figure 30-17: spi2 slave mode (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing characteristics ss2 sck2 (ckp = 0 ) sck2 (ckp = 1 ) sdo2 sdi2 sp60 sp30, sp31 msb bit 14 - - - - - -1 lsb sp51 bit 14 - - - -1 lsb in sp35 sp52 sp73 sp72 sp72 sp73 sp70 sp40 sp41 note: refer to figure 30-1 for load conditions. sp36 sp50 msb in downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 369 dspic33evxxxgm00x/10x family table 30-34: spi2 slave mo de (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck2 input frequency 11 mhz see note 3 sp72 tscf sck2 input fall time ns see parameter do32 and note 4 sp73 tscr sck2 input rise time ns see parameter do31 and note 4 sp30 tdof sdo2 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo2 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo2 data output valid after sck2 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo2 data output setup to first sck2 edge 30 ns sp40 tdiv2sch, tdiv2scl setup time of sdi2 data input to sck2 edge 30 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi2 data input to sck2 edge 30 ns sp50 tssl2sch, tssl2scl ss2 ? to sck2 ? or sck2 ?? input 120 ns sp51 tssh2doz ss2 ? to sdo2 output high-impedance 10 50 ns see note 4 sp52 tsch2ssh tscl2ssh ss2 ?? after sck2 edge 1.5 t cy + 40 ns see note 4 sp60 tssl2dov sdo2 data output valid after ss2 edge 50 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck2 is 91 ns. therefore, the sck2 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi2 pins. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 370 ? 2013-2015 microchip technology inc. figure 30-18: spi2 slave mode (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing characteristics ss 2 sck2 (ckp = 0 ) sck2 (ckp = 1 ) sdo2 sp50 sp40 sp41 sp30, sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 note: refer to figure 30-1 for load conditions. sdi2 sp70 sp36 msb in downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 371 dspic33evxxxgm00x/10x family table 30-35: spi2 slave mo de (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck2 input frequency 15 mhz see note 3 sp72 tscf sck2 input fall time ns see parameter do32 and note 4 sp73 tscr sck2 input rise time ns see parameter do31 and note 4 sp30 tdof sdo2 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo2 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo2 data output valid after sck2 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo2 data output setup to first sck2 edge 30 ns sp40 tdiv2sch, tdiv2scl setup time of sdi2 data input to sck2 edge 30 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi2 data input to sck2 edge 30 ns sp50 tssl2sch, tssl2scl ss2 ? to sck2 ? or sck2 ?? input 120 ns sp51 tssh2doz ss2 ? to sdo2 output high-impedance 10 50 ns see note 4 sp52 tsch2ssh tscl2ssh ss2 ?? after sck2 edge 1.5 t cy + 40 ns see note 4 note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck2 is 66.7 ns. therefore, the sck2 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi2 pins. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 372 ? 2013-2015 microchip technology inc. figure 30-19: spi2 slave mode (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing characteristics ss 2 sck2 (ckp = 0 ) sck2 (ckp = 1 ) sdo2 sp50 sp40 sp41 sp30, sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 note: refer to figure 30-1 for load conditions. sdi2 sp70 sp36 msb in downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 373 dspic33evxxxgm00x/10x family table 30-36: spi2 slave mo de (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck2 input frequency 11 mhz see note 3 sp72 tscf sck2 input fall time ns see parameter do32 and note 4 sp73 tscr sck2 input rise time ns see parameter do31 and note 4 sp30 tdof sdo2 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo2 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo2 data output valid after sck2 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo2 data output setup to first sck2 edge 30 ns sp40 tdiv2sch, tdiv2scl setup time of sdi2 data input to sck2 edge 30 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi2 data input to sck2 edge 30 ns sp50 tssl2sch, tssl2scl ss2 ? to sck2 ? or sck2 ?? input 120 ns sp51 tssh2doz ss2 ? to sdo2 output high-impedance 10 50 ns see note 4 sp52 tsch2ssh tscl2ssh ss2 ?? after sck2 edge 1.5 t cy + 40 ns see note 4 note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck2 is 91 ns. therefore, the sck2 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi2 pins. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 374 ? 2013-2015 microchip technology inc. table 30-37: spi1 maximu m data/clock rate summary figure 30-20: spi1 master mode ( half-duplex, transmit only, cke = 0 ) timing characteristics ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended maximum data rate master transmit only (half-duplex) master transmit/receive (full-duplex) slave transmit/receive (full-duplex) cke ckp smp 25 mhz table 30-38 0 , 10 , 10 , 1 25 mhz table 30-39 10 , 11 25 mhz table 30-40 00 , 11 25 mhz table 30-41 100 25 mhz table 30-42 110 25 mhz table 30-43 010 25 mhz table 30-44 000 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp10 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 30-1 for load conditions. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 375 dspic33evxxxgm00x/10x family figure 30-21: spi1 master mode ( half-duplex, transmit only, cke = 1 ) timing characteristics table 30-38: spi1 master mode (half-duple x, transmit only) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck1 frequency 25 mhz see note 3 sp20 tscf sck1 output fall time ns see parameter do32 and note 4 sp21 tscr sck1 output rise time ns see parameter do31 and note 4 sp30 tdof sdo1 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo1 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 62 0n s sp36 tdiv2sch, tdiv2scl sdo1 data output setup to first sck1 edge 20 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 66.7 ns. therefore, the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi1 pins. sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 30-1 for load conditions. sp36 sp10 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 376 ? 2013-2015 microchip technology inc. figure 30-22: spi1 master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing characteristics sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 sp30, sp31 note: refer to figure 30-1 for load conditions. sp36 sp41 lsb in bit 14 - - - -1 sdi1 sp40 sp10 msb in table 30-39: spi1 master mode (full-duplex, cke = 1 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck1 frequency 25 mhz see note 3 sp20 tscf sck1 output fall time ns see parameter do32 and note 4 sp21 tscr sck1 output rise time ns see parameter do31 and note 4 sp30 tdof sdo1 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo1 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 62 0n s sp36 tdov2sc, tdov2scl sdo1 data output setup to first sck1 edge 2 0 n s sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 2 0 n s sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 1 5 n s note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 100 ns. therefore, the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 377 dspic33evxxxgm00x/10x family figure 30-23: spi1 master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing characteristics sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sd1 sp40 sp41 sp21 sp20 sp35 sp20 sp21 msb lsb bit 14 - - - - - -1 lsb in bit 14 - - - -1 sp30, sp31 sp30, sp31 note: refer to figure 30-1 for load conditions. sp36 sp10 msb in downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 378 ? 2013-2015 microchip technology inc. table 30-40: spi1 master mode (full-duplex, cke = 0 , ckp = x , smp = 1 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp10 fscp maximum sck1 frequency 25 mhz -40c to +125c and see note 3 sp20 tscf sck1 output fall time ns see parameter do32 and note 4 sp21 tscr sck1 output rise time ns see parameter do31 and note 4 sp30 tdof sdo1 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo1 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 62 0n s sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 2 0 n s sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 2 0 n s sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 2 0 n s note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 100 ns. therefore, the clock generated in master mode must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 379 dspic33evxxxgm00x/10x family figure 30-24: spi1 slave mode (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing characteristics ss1 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp60 sdi1 sp30, sp31 msb bit 14 - - - - - -1 lsb sp51 bit 14 - - - -1 lsb in sp35 sp52 sp73 sp72 sp72 sp73 sp40 sp41 note: refer to figure 30-1 for load conditions. sp36 sp50 msb in sp70 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 380 ? 2013-2015 microchip technology inc. table 30-41: spi1 slave mo de (full-duplex, cke = 1 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck1 input frequency 25 mhz see note 3 sp72 tscf sck1 input fall time ns see parameter do32 and note 4 sp73 tscr sck1 input rise time ns see parameter do31 and note 4 sp30 tdof sdo1 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo1 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 20 ns sp40 tdiv2sch, tdiv2scl setup time of sdix data input to sck1 edge 20 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 15 ns sp50 tssl2sch, tssl2scl ss1 ? to sck1 ? or sck1 ?? input 120 ns sp51 tssh2doz ss1 ? to sdo1 output high-impedance 10 50 ns see note 4 sp52 tsch2ssh tscl2ssh ss1 ?? after sck1 edge 1.5 t cy + 40 ns see note 4 sp60 tssl2dov sdo1 data output valid after ss1 edge 50 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 66.7 ns. therefore, the sck1 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 381 dspic33evxxxgm00x/10x family figure 30-25: spi1 slave mode (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing characteristics ss1 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp60 sdi1 sp30, sp31 msb bit 14 - - - - - -1 lsb sp51 bit 14 - - - -1 lsb in sp35 sp52 sp73 sp72 sp72 sp73 sp70 sp40 sp41 note: refer to figure 30-1 for load conditions. sp36 sp50 msb in downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 382 ? 2013-2015 microchip technology inc. table 30-42: spi1 slave mo de (full-duplex, cke = 1 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck1 input frequency 25 mhz see note 3 sp72 tscf sck1 input fall time ns see parameter do32 and note 4 sp73 tscr sck1 input rise time ns see parameter do31 and note 4 sp30 tdof sdo1 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo1 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 20 ns sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 20 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 15 ns sp50 tssl2sch, tssl2scl ss1 ? to sck1 ? or sck1 ?? input 120 ns sp51 tssh2doz ss1 ? to sdo1 output high-impedance 10 50 ns see note 4 sp52 tsch2ssh, tscl2ssh ss1 ?? after sck1 edge 1.5 t cy + 40 ns see note 4 sp60 tssl2dov sdo1 data output valid after ss1 edge 50 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 91 ns. therefore, the sck1 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 383 dspic33evxxxgm00x/10x family figure 30-26: spi1 slave mode (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing characteristics ss 1 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp50 sp40 sp41 sp30, sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 note: refer to figure 30-1 for load conditions. sdi1 sp70 sp36 msb in downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 384 ? 2013-2015 microchip technology inc. table 30-43: spi1 slave mo de (full-duplex, cke = 0 , ckp = 1 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck1 input frequency 25 mhz see note 3 sp72 tscf sck1 input fall time ns see parameter do32 and note 4 sp73 tscr sck1 input rise time ns see parameter do31 and note 4 sp30 tdof sdo1 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo1 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 20 ns sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 20 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 15 ns sp50 tssl2sch, tssl2scl ss1 ? to sck1 ? or sck1 ?? input 120 ns sp51 tssh2doz ss1 ? to sdo1 output high-impedance 10 50 ns see note 4 sp52 tsch2ssh, tscl2ssh ss1 ?? after sck1 edge 1.5 t cy + 40 ns see note 4 note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 66.7 ns. therefore, the sck1 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 385 dspic33evxxxgm00x/10x family figure 30-27: spi1 slave mode (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing characteristics ss 1 sck1 (ckp = 0 ) sck1 (ckp = 1 ) sdo1 sp50 sp40 sp41 sp30, sp31 sp51 sp35 msb lsb bit 14 - - - - - -1 bit 14 - - - -1 lsb in sp52 sp73 sp72 sp72 sp73 note: refer to figure 30-1 for load conditions. sdi1 sp70 sp36 msb in downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 386 ? 2013-2015 microchip technology inc. table 30-44: spi1 slave mo de (full-duplex, cke = 0 , ckp = 0 , smp = 0 ) timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions sp70 fscp maximum sck1 input frequency 25 mhz see note 3 sp72 tscf sck1 input fall time ns see parameter do32 and note 4 sp73 tscr sck1 input rise time ns see parameter do31 and note 4 sp30 tdof sdo1 data output fall time ns see parameter do32 and note 4 sp31 tdor sdo1 data output rise time ns see parameter do31 and note 4 sp35 tsch2dov, tscl2dov sdo1 data output valid after sck1 edge 6 20 ns sp36 tdov2sch, tdov2scl sdo1 data output setup to first sck1 edge 20 ns sp40 tdiv2sch, tdiv2scl setup time of sdi1 data input to sck1 edge 20 ns sp41 tsch2dil, ts c l 2 d i l hold time of sdi1 data input to sck1 edge 15 ns sp50 tssl2sch, tssl2scl ss1 ? to sck1 ? or sck1 ?? input 120 ns sp51 tssh2doz ss1 ? to sdo1 output high-impedance 10 50 ns see note 4 sp52 tsch2ssh, tscl2ssh ss1 ?? after sck1 edge 1.5 t cy + 40 ns see note 4 note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. 3: the minimum clock period for sck1 is 91 ns. therefore, the sck1 clock generated by the master must not violate this specification. 4: assumes 50 pf load on all spi1 pins. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 387 dspic33evxxxgm00x/10x family figure 30-28: i2cx bus start/stop bits timing characteristics (master mode) figure 30-29: i2cx bus data timing characteristics (master mode) sclxsdax start condition stop condition note: refer to figure 30-1 for load conditions. im31 im30 im34 im33 im11 im10 im33 im11 im10 im20 im26 im25 im40 im40 im45 im21 sclx sdax in sdax out note: refer to figure 30-1 for load conditions. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 388 ? 2013-2015 microchip technology inc. table 30-45: i2cx bus data timing requirements (master mode) ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 4 ) min. ( 1 ) max. units conditions im10 t lo : scl clock low time 100 khz mode t cy /2 (brg + 2) ? s 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im11 t hi : scl clock high time 100 khz mode t cy /2 (brg + 2) ? s 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im20 t f : scl sdax and sclx fall time 100 khz mode 300 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 2 ) 100 ns im21 t r : scl sdax and sclx rise time 100 khz mode 1000 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 2 ) 300 ns im25 t su : dat data input setup time 100 khz mode 250 ns 400 khz mode 100 ns 1 mhz mode ( 2 ) 40 ns im26 t hd : dat data input hold time 100 khz mode 0 ? s 400 khz mode 0 0.9 ? s 1 mhz mode ( 2 ) 0.2 ? s im30 t su : sta start condition setup time 100 khz mode t cy /2 (brg + 2) ? s only relevant for repeated start condition 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im31 t hd : sta start condition hold time 100 khz mode t cy /2 (brg + 2) ? s after this period, the first clock pulse is generated 400 khz mode t cy /2 (brg +2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im33 t su : sto stop condition setup time 100 khz mode t cy /2 (brg + 2) ? s 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im34 t hd : sto stop condition hold time 100 khz mode t cy /2 (brg + 2) ? s 400 khz mode t cy /2 (brg + 2) ? s 1 mhz mode ( 2 ) t cy /2 (brg + 2) ? s im40 t aa : scl output valid from clock 100 khz mode 3500 ns 400 khz mode 1000 ns 1 mhz mode ( 2 ) 400 ns im45 t bf : sda bus free time 100 khz mode 4.7 ? s time the bus must be free before a new transmission can start 400 khz mode 1.3 ? s 1 mhz mode ( 2 ) 0.5 ? s im50 c b bus capacitive loading 400 pf im51 t pgd pulse gobbler delay 65 390 ns see note 3 note 1: brg is the value of the i 2 c? baud rate generator. refer to inter-integrated circuit? (i 2 c?) (ds70000195) in the dspic33/pic24 family reference manual. please see the microchip web site for the latest dspic33/pic24 family reference manual sections. 2: maximum pin capacitance = 10 pf for all i2cx pins (for 1 mhz mode only). 3: typical value for this parameter is 130 ns. 4: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 389 dspic33evxxxgm00x/10x family figure 30-30: i2cx bus start/stop bits timing characteristics (slave mode) figure 30-31: i2cx bus data timi ng characteristics (slave mode) sclxsdax start condition stop condition is34 is33 is31 is30 is30 is31 is33 is11 is10 is20 is25 is40 is40 is45 is21 sclx sdax in sdax out is26 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 390 ? 2013-2015 microchip technology inc. table 30-46: i2cx bus data timing requirements (slave mode) ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. no. symbol characteristic ( 3 ) min. max. units conditions is10 t lo : scl clock low time 100 khz mode 4.7 ? s 400 khz mode 1.3 ? s 1 mhz mode ( 1 ) 0.5 ? s is11 t hi : scl clock high time 100 khz mode 4.0 ? s device must operate at a minimum of 1.5 mhz 400 khz mode 0.6 ? s device must operate at a minimum of 10 mhz 1 mhz mode ( 1 ) 0.5 ? s is20 t f : scl sdax and sclx fall time 100 khz mode 300 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 1 ) 1 0 0n s is21 t r : scl sdax and sclx rise time 100 khz mode 1000 ns c b is specified to be from 10 to 400 pf 400 khz mode 20 + 0.1 c b 300 ns 1 mhz mode ( 1 ) 3 0 0n s is25 t su : dat data input setup time 100 khz mode 250 ns 400 khz mode 100 ns 1 mhz mode ( 1 ) 100 ns is26 t hd : dat data input hold time 100 khz mode 0 ? s 400 khz mode 0 0.9 ? s 1 mhz mode ( 1 ) 00 . 3 ? s is30 t su : sta start condition setup time 100 khz mode 4.7 ? s only relevant for repeated start condition 400 khz mode 0.6 ? s 1 mhz mode ( 1 ) 0.25 ? s is31 t hd : sta start condition hold time 100 khz mode 4.0 ? s after this period, the first clock pulse is generated 400 khz mode 0.6 ? s 1 mhz mode ( 1 ) 0.25 ? s is33 t su : sto stop condition setup time 100 khz mode 4.7 ? s 400 khz mode 0.6 ? s 1 mhz mode ( 1 ) 0.6 ? s is34 t hd : sto stop condition hold time 100 khz mode 4 ? s 400 khz mode 0.6 ? s 1 mhz mode ( 1 ) 0.25 ? s is40 t aa : scl output valid from clock 100 khz mode 0 3500 ns 400 khz mode 0 1000 ns 1 mhz mode ( 1 ) 03 5 0n s is45 t bf : sda bus free time 100 khz mode 4.7 ? s time the bus must be free before a new transmission can start 400 khz mode 1.3 ? s 1 mhz mode ( 1 ) 0.5 ? s is50 c b bus capacitive loading 400 pf is51 t pgd pulse gobbler delay 65 390 ns see note 2 note 1: maximum pin capacitance = 10 pf for all i2cx pins (for 1 mhz mode only). 2: the typical value for this parameter is 130 ns. 3: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 391 dspic33evxxxgm00x/10x family figure 30-32: canx module i/o timing characteristics table 30-47: canx module i/o timing requirements figure 30-33: uart x module i/o timing characteristics table 30-48: uartx module i/o timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions ca10 t io f port output fall time ns see parameter do32 ca11 t io r port output rise time ns see parameter do31 ca20 t cwf pulse width to trigger can wake-up filter 120 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. parameters are for design guidance only and are not tested. ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +125c param no. symbol characteristic ( 1 ) min. typ. ( 2 ) max. units conditions ua10 t uabaud uartx baud time 66.67 ns ua11 f baud uartx baud frequency 15 mbps ua20 t cwf start bit pulse width to trigger uartx wake-up 500 ns note 1: these parameters are characterized but not tested in manufacturing. 2: data in typ. column is at 5.0v, +25c unless otherwise stated. parameters are for design guidance only and are not tested. cxtx pin (output) ca10, ca11 old value new value ca20 cxrx pin (input) ua20 uxrx msb in lsb in bits 6-1 ua10 uxtx downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 392 ? 2013-2015 microchip technology inc. table 30-49: op amp/comp arator x specifications dc characteristics standard operating conditions (see note 3 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 1 ) max. units conditions comparator ac characteristics cm10 t resp response time 19 80 ns v+ input step of 100 mv, v- input held at v dd /2 cm11 t mc 2 ov comparator mode change to output valid 1 0 s comparator dc characteristics cm30 v offset comparator offset voltage -80 60 80 mv cm31 v hyst input hysteresis voltage 30 mv cm32 t rise / t fall comparator output rise/fall time 20 ns 1 pf load capacitance on input cm33 v gain open-loop voltage gain 90 db cm34 v icm input common-mode voltage av ss a v dd v op amp ac characteristics cm20 s r slew rate 9 v/s 10 pf load cm21 p m phase margin 35 c g = 100v/v, 10 pf load cm22 g m gain margin 20 db g = 100v/v, 10 pf load cm23 g bw gain bandwidth 10 mhz 10 pf load op amp dc characteristics cm40 v cmr common-mode input voltage range av ss a v dd v cm41 c mrr common-mode rejection ratio 4 5 d b v cm = av dd /2 cm42 v offset op amp offset voltage -50 6 50 mv cm43 v gain open-loop voltage gain 90 db cm44 i os input offset current see pad leakage currents in table 30-10 cm45 i b input bias current see pad leakage currents in table 30-10 cm46 i out output current 420 a with minimum value of r feedback (cm48) cm48 r feedback feedback resistance value 8k ? note 2 cm49a v out output voltage av ss + 0.075 av dd C 0.075 v i out = 420 a note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. 2: resistances can vary by 10% between op amps. 3: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 393 dspic33evxxxgm00x/10x family table 30-51: op amp/comparator x voltage reference specifications table 30-50: op amp/comparator x voltag e reference settling time specifications ac characteristics standard operating conditions (see note 2 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param. symbol characteristic min. typ. max. units conditions vrd310 t set settling time 1 10 ? ssee note 1 note 1: settling time measured while cvrss = 1 and the cvr<6:0> bits transition from 0000000 to 1111111 . 2: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. dc characteristics standard operating conditions (see note 1 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristics min. typ. max. units conditions vrd311 cvr aa absolute accuracy of internal dac input to comparators 2 5m v a v dd = cv rsrc = 5.0v vrd312 cvr aa 1 absolute accuracy of cv ref x o pins +35/-65 mv av dd = cv rsrc = 5.0v vrd313 cv rsrc input reference voltage 0 av dd + 0.3 v vrd314 cvr out buffer output resistance 1.5k ? vrd315 cv cl permissible capacitive load (cv ref x o pins) 2 5p f vrd316 i ocvr permissible current output (cv ref x o pins) 1m a vrd317 i on current consumed when module is enabled 5 0 0 a a v dd = 5.0v vrd318 i off current consumed when module is disabled 1n a a v dd = 5.0v note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 394 ? 2013-2015 microchip technology inc. table 30-52: ctmu current source specifications dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic ( 1 ) min. typ. max. units conditions ctmu current source ctmui1 i out 1 base range 550 na ctmuicon<9:8> = 01 ctmui2 i out 2 10x range 5.5 a ctmuicon<9:8> = 10 ctmui3 i out 3 100x range 55 a ctmuicon<9:8> = 11 ctmui4 i out 4 1000x range 550 a ctmuicon<9:8> = 00 ctmufv1 v f temperature diode forward voltage ( 1,2 ) 0 . 5 2 5 vt a = +25c, ctmuicon<9:8> = 01 0 . 5 8 5 vt a = +25c, ctmuicon<9:8> = 10 0 . 6 4 5 vt a = +25c, ctmuicon<9:8> = 11 ctmufv2 v fvr temperature diode rate of change ( 1,2 ) -1.92 mv/c ctmuicon<9.8> = 01 -1.74 mv/c ctmuicon<9:8> = 10 -1.56 mv/c ctmuicon<9:8> = 11 note 1: nominal value at center point of current trim range (ctmuicon<15:10> = 000000 ). 2: parameters are characterized but not tested in manufacturing. measurements are taken with the following conditions: v ref = av dd = 5.0v adc configured for 10-bit mode adc configured for conversion speed of 500 ksps all pmdx bits are cleared (pmdx = 0 ) cpu executing while(1) { nop() ; } device operating from the frc with no pll downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 395 dspic33evxxxgm00x/10x family table 30-53: adc mo dule specifications ac characteristics standard operating conditions (see note 1 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions device supply ad01 av dd module v dd supply greater of: v dd C 0.3 or v bor lesser of: v dd + 0.3 or 5.5 v ad02 av ss module v ss supply v ss C 0.3 v ss + 0.3 v reference inputs ad05 v refh reference voltage high 4.5 5.5 v v refh = av dd , v refl = av ss = 0 ad06 v refl reference voltage low av ss a v dd C v bormin vsee note 1 ad06a 0 0 v v refh = av dd , v refl = av ss = 0 ad07 v ref absolute reference voltage 4.5 5.5 v v ref = v refh C v refl ad08 i ref current drain 10 600 ? a ? a adc off adc on ad09 i ad operating current 52 mama adc operating in 10-bit mode (see note 1 ) adc operating in 12-bit mode (see note 1 ) analog input ad12 v inh input voltage range v inh v inl v refh v this voltage reflects sample-and-hold channels 0, 1, 2 and 3 (ch0-ch3), positive input ad13 v inl input voltage range v inl v refl a v ss + 1v v this voltage reflects sample-and-hold channels 0, 1, 2 and 3 (ch0-ch3), negative input ad17 r in recommended impedance of analog voltage source 2 0 0 ? impedance to achieve maximum performance of adc note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but is not characterized. analog modules : adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 396 ? 2013-2015 microchip technology inc. table 30-54: adc module speci fications (12-bit mode) ac characteristics standard operating conditions (see note 1 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions adc accuracy (12-bit mode) ad20a nr resolution 12 data bits bits ad21a inl integral nonlinearity -2 +2 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v ad22a dnl differential nonlinearity ?? -1 < 1 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v ad23a g err gain error -10 4 10 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v ad24a e off offset error -10 1.75 10 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v ad25a monotonicity ( 2 ) guaranteed dynamic performance (12-bit mode) ad30a thd total harmonic distortion -75 db ad31a sinad signal to noise and distortion 68.5 69.5 db ad32a sfdr spurious free dynamic range 80 db ad33a f nyq input signal bandwidth 250 khz ad34a enob effective number of bits 11.09 11.3 bits note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. 2: the conversion result never decreases with an increase in the input voltage. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 397 dspic33evxxxgm00x/10x family table 30-55: adc module speci fications (10-bit mode) ac characteristics standard operating conditions (see note 1 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. max. units conditions adc accuracy (10-bit mode) ad20b nr resolution 10 data bits bits ad21b inl integral nonlinearity -1.5 +1.5 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v ad22b dnl differential nonlinearity ?? 1< 1l s bv inl = av ss = v refl = 0v, av dd = v refh = 5.5v ad23b g err gain error 1 3 6 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v ad24b e off offset error 1 2 4 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v ad25b monotonicity ( 2 ) guaranteed dynamic performance (10-bit mode) ad30b thd total harmonic distortion -64 db ad31b sinad signal to noise and distortion 57 58.5 db ad32b sfdr spurious free dynamic range 72 db ad33b f nyq input signal bandwidth 550 khz ad34b enob effective number of bits 9.16 9.4 bits note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but is not characterized. analog modules : adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. 2: the conversion result never decreases with an increase in the input voltage. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 398 ? 2013-2015 microchip technology inc. figure 30-34: adc conversion (12- bit mode) timing characteristics (asam = 0 , ssrc<2:0> = 000 , ssrcg = 0 ) ad55 t samp set samp ad61 adclk instruction samp ad60 done ad1if 1 2 3 4 5 6 8 7 1 C software sets adxcon1. samp to start sampling. 2 C sampling starts after discharge period. t samp is described in 3 C software clears adxcon1. samp to start conversion. 4 C sampling ends, conversion sequence starts. 5 C convert bit 11. 9 C one t ad for end of conversion. ad50 9 6 C convert bit 10. 7 C convert bit 1. 8 C convert bit 0. execution dspic33/pic24 family reference manual . analog-to-digital converter (adc) (ds70621) of the clear samp downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 399 dspic33evxxxgm00x/10x family table 30-56: adc conversion (12- bit mode) timing requirements ac characteristics standard operating conditions (see note 2 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 4 ) max. units conditions clock parameters ad50 t ad adc clock period 117.6 ns ad51 t rc adc internal rc oscillator period 250 ns conversion rate ad55 t conv conversion time 14 t ad ad56 f cnv throughput rate 500 ksps ad57a t samp sample time when sampling any anx input 3t ad ad57b t samp sample time when sampling the op amp outputs 3t ad timing parameters ad60 t pcs conversion start from sample trigger ( 1 ) 23t ad auto-convert trigger is not selected ad61 t pss sample start from setting sample (samp) bit ( 1 ) 23t ad ad62 t css conversion completion to sample start (asam = 1 ) ( 1 ) 0 . 5t ad ad63 t dpu time to stabilize analog stage from adc off to adc on ( 1 ) 2 0 ? ss e e note 3 note 1: because the sample caps will eventually lose charge, clock rates below 10 khz may affect lineari ty performance, especially at elevated temperatures. 2: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but is not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. 3: the parameter, t dpu , is the time required for the adc module to stabilize at the appropriate level when the module is turned on (adon (adxcon1<15>) = 1 ). during this time, the adc result is indeterminate. 4: these parameters are characterized but not tested in manufacturing. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 400 ? 2013-2015 microchip technology inc. figure 30-35: adc conversion (10- bit mode) timing characteristics (chps<1:0> = 01 , simsam = 0 , asam = 0 , ssrc<2:0> = 000 , ssrcg = 0 ) figure 30-36: adc conversion (10-bit mode) timing characteristics (chps<1:0> = 01 , simsam = 0 , asam = 1 , ssrc<2:0> = 111 , ssrcg = 0 , samc<4:0> = 00010 ) t samp set samp ad61 adclk instruction samp ad60 done ad1if 1 2 3 4 5 6 8 5 6 7 1 C software sets adxcon1. samp to start sampling. 2 C sampling starts after discharge period. t samp is described in 3 C software clears adxcon1. samp to start conversion. 4 C sampling ends, conversion sequence starts. 5 C convert bit 9. 8 C one t ad for end of conversion. ad50 7 8 6 C convert bit 8. 7 C convert bit 0. execution dspic33/pic24 family reference manual . analog-to-digital converter (adc) (ds70621) of the clear samp ad55 ad55 1 2 3 4 5 6 4 5 6 8 1 C software sets adxcon1. adon to start adc operation. 2 C sampling starts after discharge period. t samp is described in 3 C convert bit 9. 4 C convert bit 8. 5 C convert bit 0. 7 3 6 C one t ad for end of conversion. 7 C begin conversion of next channel. 8 C sample for time specified by samc<4:0>. adclk instruction set adon execution samp t samp ad1if done ad55 ad55 t samp ad55 ad50 analog-to-digital converter (adc) (ds70621) of the dspic33/pic24 family reference manual . ad62 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 401 dspic33evxxxgm00x/10x family table 30-57: adc conversion (10- bit mode) timing requirements ac characteristics standard operating conditions (see note 1 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. symbol characteristic min. typ. ( 4 ) max. units conditions clock parameters ad50 t ad adc clock period 75 ns ad51 t rc adc internal rc oscillator period 250 ns conversion rate ad55 t conv conversion time 12 t ad ad56 f cnv throughput rate 1.1 msps using simultaneous sampling ad57a t samp sample time when sampling any anx input 2t ad ad57b t samp sample time when sampling the op amp outputs 4t ad timing parameters ad60 t pcs conversion start from sample trigger ( 2 ) 23t ad auto-convert trigger is not selected ad61 t pss sample start from setting sample (samp) bit ( 2 ) 23t ad ad62 t css conversion completion to sample start (asam = 1 ) ( 2 ) 0 . 5t ad ad63 t dpu time to stabilize analog stage from adc off to adc on ( 2 ) 2 0 ? ssee note 3 note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but is not characterized. analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. 2: because the sample caps will eventually lose charge, clock rates below 10 khz may affect lineari ty performance, especially at elevated temperatures. 3: the parameter, t dpu , is the time required for the adc module to stabilize at the appropriate level when the module is turned on (adon (adxcon1<15>) = 1 ). during this time, the adc result is indeterminate. 4: these parameters are characterized but not tested in manufacturing. table 30-58: dma module timing requirements ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +85c for industrial -40c ? t a ? +125c for extended param no. characteristic min. typ. ( 1 ) max. units conditions dm1 dma byte/word transfer latency 1 t cy ( 2 ) n s note 1: these parameters are characterized but not tested in manufacturing. 2: because dma transfers use the cpu data bus, this time is dependent on other functions on the bus. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 402 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 403 dspic33evxxxgm00x/10x family 31.0 high-temperature el ectrical characteristics this section provides an overview of dspic33evxxxgm00x/10x family electrical characteristics for dev ices operating in an ambient temperature range of -40c to +150c. the specifications between -40c to +150c are identical to those shown in section 30.0 electrical characteristics for operation between -40c to +125c, with the exception of the parameters listed in this section. parameters in this section begin with an h, which denotes high temperature. for example, parameter dc10 in section 30.0 electrical characteristics is the industrial and extended temperature equivalent of hdc10 . absolute maximum ratings for the dspic33evxxxgm00x/10x family high-temperature devices are listed below. exposure to these maximum rating conditions for extended periods can affect device reliability. functional operation of the device at these or any other conditions above the parameters indicated in the operation listings of this specification is not implied. absolute maximum ratings ( 1 ) ambient temperature under bias ( 2 ) .........................................................................................................-40c to +150c storage temperature ............................................................................................................ .................. -65c to +160c voltage on v dd with respect to v ss ......................................................................................................... -0.3v to +6.0v maximum current out of v ss pin ........................................................................................................................... 350 ma maximum current into v dd pin ( 3 ) ...........................................................................................................................350 ma maximum junction temperature................................................................................................... .......................... +155c maximum current sunk by any i/o pin............................................................................................ .........................20 ma maximum current sourced by i/o pin ............................................................................................. .........................18 ma maximum current sunk by all ports combined .................................................................................... ..................200 ma maximum current sourced by all ports combined ( 3 ) ..............................................................................................200 ma note 1: stresses above those listed under absolute maximum ratings can cause permanent damage to the device. this is a stress rating only, and functional operation of the device at those or any other con ditions above those indicated in the operation listings of this specification is not implied. exposure to maximum rating conditions for extended periods can affect device reliability. 2: aec-q100 reliability testing for devices intended to operate at +150c is 1,000 hours. any design in which the total operating time from +125c to +150c will be greater than 1,000 hours is not warranted without prior written approval from microchip technology inc. 3: maximum allowable current is a function of device maximum power dissipation (see tab l e 3 1- 2 ). downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 404 ? 2013-2015 microchip technology inc. 31.1 high-temperature dc characteristics table 31-1: operating mips vs. voltage table 31-2: thermal operating conditions characteristic v dd range (in volts) temperature range (in c) max mips dspic33evxxxgm00x/10x family hdc5 4.5v to 5.5v ( 1,2 ) -40c to +150c 40 note 1: device is functional at v bormin < v dd < v ddmin . analog modules, such as the adc, op amp/comparator and comparator voltage reference, will have degraded performance. device functionality is tested but is not characterized. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. 2: when bor is enabled, the device will work from 4.7v to 5.5v. rating symbol min typ max unit high-temperature devices operating junction temperature range t j -40 +155 c operating ambient temperature range t a -40 +150 c power dissipation: internal chip power dissipation: p int = v dd x (i dd C ? i oh ) p d p int + p i / o w i/o pin power dissipation: i/o = ? ({v dd C v oh } x i oh ) + ? (v ol x i ol ) maximum allowed power dissipation p dmax (t j C t a )/ ? ja w table 31-3: dc temperature and voltage specifications dc characteristics standard operating conditions (see note 3 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature param no. symbol characteristic min. typ. ( 1 ) max. units conditions operating voltage hdc10 v dd supply voltage ( 3 ) v bor 5 . 5v hdc12 v dr ram data retention voltage ( 2 ) 1.8 v hdc16 v por v dd start voltage to ensure internal power-on reset signal v ss v hdc17 s vdd v dd rise rate to ensure internal power-on reset signal 1.0 v/ms 0v-5.0v in 5 ms hdc18 v core v dd core internal regulator voltage 1.62 1.8 1.98 v voltage is dependent on load, temperature and v dd note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. 2: this is the limit to which v dd may be lowered without losing ram data. 3: v dd voltage must remain at v ss for a minimum of 200 ? s to ensure por. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 405 dspic33evxxxgm00x/10x family table 31-4: dc characteristics: power-down current (i pd ) table 31-5: dc characteristics: idle current (i idle ) table 31-6: dc characteristics: operating current (i dd ) table 31-7: dc characteristics: doze current (i doze ) dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature parameter no. typical max units conditions power-down current (i pd ) hdc60e 1300 2500 ? a +150c 5v base power-down current hdc61c 10 50 ? a +150c 5v watchdog timer current: ? i wdt dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature parameter no. typical max units conditions hdc40e 2.6 5.0 ma +150c 5v 10 mips hdc42e 3.6 7.0 ma +150c 5v 20 mips dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature parameter no. typical max units conditions hdc20e 5.9 8.0 ma +150c 5v 10 mips hdc22e 10.3 15.0 ma +150c 5v 20 mips hdc23e 19.0 25.0 ma +150c 5v 40 mips dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature parameter no. typical max doze ratio units conditions hdc73a 18.5 22.0 1:2 ma +150c 5v 40 mips hdc73g 8.35 12.0 1:128 ma downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 406 ? 2013-2015 microchip technology inc. table 31-8: dc characteristics: i/o pin input specifications dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature param no. symbol characteristic min. typ. ( 1 ) max. units conditions v il input low voltage di10 any i/o pins v ss 0 . 2v dd v v ih input high voltage di20 i/o pins 0.75 v dd 5 . 5v i cnpu change notification pull-up current di30 200 375 600 ? av dd = 5.0v, v pin = v ss i cnpd change notification pull-down current ( 7 ) di31 175 400 625 ? av dd = 5.0v, v pin = v dd i il input leakage current ( 2 , 3 ) di50 i/o pins -200 200 na v ss ? v pin ? v dd , pin at high-impedance di55 mclr -1.5 1.5 ? av ss ?? v pin ?? v dd di56 osc1 -300 300 na v ss ?? v pin ?? v dd , xt and hs modes di60a i icl input low injection current 0 - 5 ( 4 , 6 ) ma all pins except v dd , v ss , av dd , av ss , mclr , v cap and rb7 i ich input high injection current di60b 0 +5 ( 5 , 6 ) ma all pins except v dd , v ss , av dd , av ss , mclr , v cap , rb7 and all 5v tolerant pins ( 5 ) ? i ict total input injection current di60c (sum of all i/o and control pins) -20 ( 7 ) + 2 0 ( 7 ) ma absolute instantaneous sum of all input injection currents from all i/o pins ( | ii cl | + | i ich |) ? ? i ict note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. 2: the leakage current on the mclr pin is strongly dependent on the applied voltage level. the specified levels represent normal operating conditions. higher leakage current can be measured at different input voltages. 3: negative current is defined as current sourced by the pin. 4: v il source < (v ss C 0.3). characterized but not tested. 5: digital 5v tolerant pins cannot tolerate any positive input injectio n current from input sources > 5.5v. 6: non-zero injection currents can affect the adc results by approximately 4-6 counts. 7: any number and/or combination of i/o pins not excluded under i icl or i ich conditions are permitted, provided the mathematical absolute instantaneous sum of the input injection currents from all pins do not exceed the specified limit. characterized but not tested. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 407 dspic33evxxxgm00x/10x family table 31-9: dc characteristics: i/o pin output specifications dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature param no. symbol characteristic min. ( 1 ) typ. max. units conditions hdo16 v ol output low voltage 4x sink driver pins ( 2 ) 0 . 4v i ol = 8.8 ma, v dd = 5.0v hdo10 v ol output low voltage 8x sink driver pins ( 3 ) 0 . 4v i ol = 10.8 ma, v dd = 5.0v hdo26 v oh output high voltage 4x sink driver pins ( 2 ) v dd C 0.6 v i oh = -8.3 ma, v dd = 5.0v hdo20 v oh output high voltage 8x sink driver pins v dd C 0.6 v i oh = -12.3 ma, v dd = 5.0v note 1: parameters are characterized but not tested. 2: includes all i/o pins that are not 8x sink driver pins (see below). 3: includes the pins, such as ra3, ra4 and rb<15:10> for 28-pin devices, ra3, ra4, ra9 and rb<15:10> for 44-pin devices and ra4, ra7, ra9, rb<15:10> and rc15 for 64-pin devices. table 31-10: electrical characteristics: bor dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature param no. symbol characteristic min. ( 1 ) typ. max. units conditions hbo10 v bor bor event on v dd transition high-to-low 4.15 4.285 4.4 v v dd (see note 2 , note 3 and note 4 ) note 1: parameters are for design guidance only and are not tested in manufacturing. 2: the v bor specification is relative to the v dd . 3: the device is functional at v bormin < v dd < v ddmin . analog modules: adc, op amp/comparator and comparator voltage reference, will have degraded performance. device functionality is tested but is not characterized. 4: the start-up v dd must rise above 4.6v. table 31-11: dc characteristics: program memory dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c for high temperature param no. symbol characteristic ( 1 ) min. typ. max. units conditions program flash memory hd130 e p cell endurance 10,000 e/w -40c to +150c ( 2 ) hd134 t retd characteristic retention 20 year 1000 e/w cycles or less and no other specifications are violated note 1: these parameters are assured by design, but are not characterized or tested in manufacturing. 2: programming of the flash memory is allowed up to +150c. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 408 ? 2013-2015 microchip technology inc. 31.2 ac characteristics and timing parameters the information contained in this section defines the dspic33evxxxgm00x/10x family ac characteristics and timing parameters for high-temperature devices. however, all ac timing specifications in this section are the same as those in section 30.2 ac characteristics and timing parameters , with the exception of the parameters listed in this section. parameters in this section begin with an h, which denotes high temperature. for example, parameter os53 in section 30.2 ac characteristics and timing parameters is the industrial and extended temperature equivalent of hos53 . table 31-12: temperature and vo ltage specifications C ac figure 31-1: load conditions for device timing specifications ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c operating voltage v dd range as described in table 31-1 . v dd /2 c l r l pin pin v ss v ss c l r l =464 ? c l = 50 pf for all pins except osc2 15 pf for osc2 output load condition 1 C for all pins except osc2 load condition 2 C for osc2 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 409 dspic33evxxxgm00x/10x family table 31-13: pll clock timing specifications ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. symbol characteristic min. typ. ( 1 ) max. units conditions hos50 f plli pll voltage controlled oscillator (vco) input frequency range 0.8 8.0 mhz ecpll, xtpll modes hos51 f sys on-chip vco system frequency 120 340 mhz hos52 t lock pll start-up time (lock time) 0.9 1.5 3.1 ms hos53 d clk clko stability (jitter) ( 2 ) -3 0.5 3 % note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. parameters are for design guidance only and are not tested. 2: this jitter specification is based on clock cycle-by-clock cycle measurements. to get the effectiv e jitter for individual time bases or communication clocks used by the application, use the following formula: for example, if f osc = 120 mhz and the spi bit rate = 10 mhz, the effective jitter is as follows: effective jitter d clk f osc time base or communication clock -------------------------------------------------------------------------------------- - ------------------------------------------------------------------------------------------- = effective jitter d clk 120 10 -------- - ------------- - d clk 12 ------------- - d clk 3.464 ------------- - === table 31-14: internal frc accuracy ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. characteristic min typ max units conditions internal frc accuracy @ frc frequency = 7.3728 mhz hf20c frc -3 1 +3 % -40c ? t a ?? +150c v dd = 4.5v to 5.5v table 31-15: internal lprc accuracy ac characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. characteristic min typ max units conditions lprc @ 32.768 khz ( 1 , 2 ) hf21c lprc -30 10 +30 % -40c ? t a ?? +150c v dd = 4.5v to 5.5v note 1: change of lprc frequency as v dd changes. 2: lprc accuracy impacts the watchdog timer time-out period (t wdt 1). see section 27.5 watchdog timer (wdt) for more information. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 410 ? 2013-2015 microchip technology inc. table 31-16: ctmu current source specifications dc characteristics standard operating conditions: 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. symbol characteristic ( 1 ) min. typ. max. units conditions ctmu current source hctmul1 l out 1 base range 550 na ctmuicon<9.8> = 01 hctmul2 l out 2 10x range 5.5 ? a ctmuicon<9.8> = 10 hctmul3 l out 3 100x range 55 ? a ctmuicon<9.8> = 11 hctmul0 l out 4 1000x range 550 ? a ctmuicon<9.8> = 00 hctmufv1 v f temperature diode forward voltage ( 2 ) 0 . 5 2 5 vt a = +25c, ctmuicon<9.8> = 01 0 . 5 8 5 vt a = +25c, ctmuicon<9.8> = 10 0 . 6 4 5 vt a = +25c, ctmuicon<9.8> = 11 note 1: normal value at center point of current trim range (ctmuicon<15:10> = 000000 ). 2: parameters are characterized but not tested in manufacturing. measurements are taken with the following conditions: v ref = av dd = 5.0v adc module configured for 10-bit mode adc module configured for conversion speed of 500 ksps all pmdx bits are cleared (pmdx = 0 ) cpu executing while(1) { nop() ; } device operating from the frc with no pll downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 411 dspic33evxxxgm00x/10x family table 31-17: op amp/co mparator specifications dc characteristics standard operating conditions: (see note 3 ) 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. symbol characteristic min. typ. ( 1 ) max. units conditions comparator dc characteristics hcm30 v offset comparator offset voltage -80 60 80 mv hcm31 v hyst input hysteresis voltage 30 mv hcm34 v icm input common-mode voltage av ss a v dd v op amp dc characteristics ( 2 ) hcm40 v cmr common-mode input voltage range av ss a v dd v hcm42 v offset op amp offset voltage -50 6 50 mv note 1: data in typ. column is at 5.0v, +25c unless otherwise stated. 2: resistances can vary by +/-10% between op amps. 3: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but is not characterized. analog modules : adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter hbo10 in table 31-10 for the minimum and maximum bor values. table 31-18: adc module speci fications (12-bit mode) ac characteristics standard operating conditions (see note 1 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. symbol characteristic min. typ. max. units conditions adc accuracy (12-bit mode) had20a nr resolution 12 data bits bits had21a inl integral nonlinearity -2 +2 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v had22a dnl differential nonlinearity ?? -1 < 1 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v had23a g err gain error -10 4 10 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v had24a e off offset error -10 1.75 10 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but is not characterized. analog modules : adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter bo10 in table 30-12 for the minimum and maximum bor values. downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 412 ? 2013-2015 microchip technology inc. table 31-19: adc module speci fications (10-bit mode) ac characteristics standard operating conditions (see note 1 ): 4.5v to 5.5v (unless otherwise stated) operating temperature -40c ? t a ? +150c param no. symbol characteristic min. typ. max. units conditions adc accuracy (10-bit mode) had20b nr resolution 10 data bits bits had21b inl integral nonlinearity -1.5 +1.5 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v had22b dnl differential nonlinearity ?? 1< 1l s bv inl = av ss = v refl = 0v, av dd = v refh = 5.5v had23b g err gain error 1 3 6 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v had24b e off offset error 1 2 4 lsb v inl = av ss = v refl = 0v, av dd = v refh = 5.5v note 1: device is functional at v bormin < v dd < v ddmin , but will have degraded performance. device functionality is tested, but is not characterized. analog modules : adc, op amp/comparator and comparator voltage reference, will have degraded performance. refer to parameter hbo10 in table 31-10 for the minimum and maximum bor values. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 413 dspic33evxxxgm00x/10x family 32.0 packaging information 32.1 package marking information 28-lead spdip (.300) xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx yywwnnn example dspic33ev256gm002 1510017 28-lead soic (.300) xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx yywwnnn example 28-lead qfn-s (6x6x0.9 mm) xxxxxxxx xxxxxxxx yywwnnn example 33ev256 gm002 legend: xx...x customer-specific information y year code (last digit of calendar year) yy year code (last 2 digits of calendar year) ww week code (week of january 1 is week 01) nnn alphanumeric traceability code note: in the event the full microchip part number cannot be marked on one line, it will be carried over to the next line, thus limiting the number of available characters for customer-specific information. dspic33ev256gm002 1510017 1510017 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 414 ? 2013-2015 microchip technology inc. 32.1 package marking information (continued) 44-lead tqfp (10x10x1 mm) xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx yywwnnn example dspic33 ev256gm004 pin 1 xxxxxxxxxx 44-lead qfn (8x8x0.9 mm) xxxxxxxxxx xxxxxxxxxx yywwnnn pin 1 dspic33 example ev256gm004 1510017 1510017 64-lead qfn (9x9x0.9 mm) example xxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxx yywwnnn dspic33 ev256gm006 64-lead tqfp (10x10x1mm) xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx yywwnnn example dspic33 ev256gm006 1510017 1510017 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 415 dspic33evxxxgm00x/10x family 32.2 package details the following sections give the technical details of the packages. 
       
      
 !"   !"#$%&" '  ()"&'"!&)
&#*& &  & #   +%&,  & !& - '!
!#.#

&"#'
#%! 

& "!
!
#%! 

& "!
!! 
&$#/  !#  '!
#&
   .0 1,2 1!'!
 
&$& "!
**&
"&&
 ! !" 3
& '
!&" & 4# *!( !!& 
  4 %&

&#& && 255***'
  
'5 4 6&! 7,8. '!
9'&! 7 7: ; 7"') 
%! 7 < &  1,
&
&  = =  
##4 4!!   -  1!&
&   = = 
"# &

"# >#& .  - -- 
##4>#& .  <  :  9&  - -?   &
& 9  -  9# 4!!  <   6  9#>#& )    9
* 9#>#& )  <  :  
* + 1 = = - note 1 n 12 d e1 eb c e l a2 e b b1 a1 a 3 
   

  * ,1 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 416 ? 2013-2015 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 417 dspic33evxxxgm00x/10x family note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 418 ? 2013-2015 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 419 dspic33evxxxgm00x/10x family downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 420 ? 2013-2015 microchip technology inc. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 421 dspic33evxxxgm00x/10x family    # $% !   & ''  ()()*+   #$!
, - *.  /   &- !" 3
& '
!&" & 4# *!( !!& 
  4 %&

&#& && 255***'
  
'5 4 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 422 ? 2013-2015 microchip technology inc. b a 0.20 h a b 0.20 h a b 44 x b 0.20 c a b (datum b) (datum a) c seating plane 2x top view side view bottom view microchip technology drawing c04-076c sheet 1 of 2 for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: e note 1 12 n d d1 e e1 2x a2 a1 a 0.10 c 3 n aa 0.20 c a b 4x 11 tips 123 44-lead plastic thin quad flatpack (pt) - 10x10x1.0 mm body [tqfp] note 1 note 2 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 423 dspic33evxxxgm00x/10x family microchip technology drawing c04-076c sheet 2 of 2 for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: l (l1) c section a-a h number of leads overall height lead width overall width overall length lead length molded package width molded package length molded package thickness lead pitch standoff units dimension limits a1 a b d e1 d1 a2 e l e n 0.80 bsc 0.45 0.30 - 0.05 0.37 12.00 bsc 0.60 10.00 bsc 10.00 bsc -- 12.00 bsc millimeters min nom 44 0.75 0.45 1.200.15 max 0.95 1.00 1.05 ref: reference dimension, usually without tolerance, for information purposes only. bsc: basic dimension. theoretically exact value shown without tolerances. 1. 2.3. noes: pin 1 visual index feature may vary, but must be located within the hatched area. exact shape of each corner is optional. dimensioning and tolerancing per asme y14.5m footprint l1 1.00 ref 3.5 0 7 foot angle lead thickness c 0.09 - 0.20 44-lead plastic thin quad flatpack (pt) - 10x10x1.0 mm body [tqfp] downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 424 ? 2013-2015 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 425 dspic33evxxxgm00x/10x family downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 426 ? 2013-2015 microchip technology inc. downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 427 dspic33evxxxgm00x/10x family downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 428 ? 2013-2015 microchip technology inc. 0.20 c a-b d 64 x b 0.08 c a-b d c seating plane 4x n/4 tips top view side view for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: microchip technology drawing c04-085c sheet 1 of 2 64-lead plastic thin quad flatpack (pt)-10x10x1 mm body, 2.00 mm footprint [tqfp] d e e1 d1 d a b 0.20 h a-b d 4x d1/2 e a 0.08 c a1 a2 see detail 1 a a e1/2 note 1 note 2 1 2 3 n 0.05 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 429 dspic33evxxxgm00x/10x family for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: 64-lead plastic thin quad flatpack (pt)-10x10x1 mm body, 2.00 mm footprint [tqfp] 13 12 11 e mold draft angle bottom 13 12 11 d mold draft angle top 0.27 0.22 0.17 b lead width 0.20 - 0.09 c lead thickness 10.00 bsc d1 molded package length 10.00 bsc e1 molded package width 12.00 bsc d overall length 12.00 bsc e overall width 7 3.5 0 i foot angle 0.75 0.60 0.45 l foot length 0.15 - 0.05 a1 standoff 1.05 1.00 0.95 a2 molded package thickness 1.20 - - a overall height 0.50 bsc e lead pitch 64 n number of leads max nom min dimension limits millimeters units footprint l1 1.00 ref 2. chamfers at corners are optional; size may vary. 1. pin 1 visual index feature may vary, but must be located within the hatched area. 4. dimensioning and tolerancing per asme y14.5m bsc: basic dimension. theoretically exact value shown without tolerances. ref: reference dimension, usually without tolerance, for information purposes only. 3. dimensions d1 and e1 do not include mold flash or protrusions. mold flash or protrusions shall not exceed 0.25mm per side. noes: microchip technology drawing c04-085c sheet 2 of 2 l (l1) e c h x x=ab or d e/2 detail 1 section a-a t downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 430 ? 2013-2015 microchip technology inc. recommended land pattern for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging note: dimension limits units c1 contact pad spacing contact pad spacing contact pitch c2 millimeters 0.50 bsc min e max 11.4011.40 contact pad length (x28) contact pad width (x28) y1 x1 1.50 0.30 bsc: basic dimension. theoretically exact value shown without tolerances. notes: 1. dimensioning and tolerancing per asme y14.5m microchip technology drawing c04-2085b sheet 1 of 1 g distance between pads 0.20 nom 64-lead plastic thin quad flatpack (pt)-10x10x1 mm body, 2.00 mm footprint [tqfp] c2 c1 e g y1 x1 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 431 dspic33evxxxgm00x/10x family note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 432 ? 2013-2015 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 433 dspic33evxxxgm00x/10x family note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 434 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 435 dspic33evxxxgm00x/10x family appendix a: revision history revision a (december 2013) this is the initial version of this document. revision b (june 2014) this revision incorporates the following updates: sections: - added section 31.0 high-temperature electrical characteristics - updated the power management section, the input/output section, section 3.3 data space addressing , section 4.2 data address space , section 4.3.2 extended x data space , section 4.6.1 bit-reversed addressing implementa- tion , section 7.4.1 intcon1 through intcon4 , section 11.7 i/o helpful tips - updated note in section 17.0 high-speed pwm module , section 18.0 serial peripheral interface (spi) , section 27.8 code protection and codeguard? security - updated title of section 20.0 single-edge nibble transmission (sent) - updated section 32.0 packaging informa- tion . deleted e3, pb-free and industrial (i) temperature range indication throughout the section, and updated the packaging diagrams - updated the product identification system section registers: - updated register 3-2 , register 7-2 , register 7-6 , register 9-2 , register 11-3 , register 14-1 , register 14-3 , register 14-11 , register 15-1 , register 22-4 figures: - added figure 4-6 , figure 4-8 , figure 4-14 , figure 4-15 , figure 14-1 , figure 16-1 , figure 17-2 , figure 23-1 , figure 24-1 tables: - updated ta b l e 1 , table 27-1 , tab l e 2 7- 2 , table 30-6 , table 30-7 , ta b l e 3 0 - 8 , table 30-9 , table 30-10 , tab le 3 0- 11 , table 30-12 , table 30-37 , table 30-49 , table 30-52 and added ta b l e 3 1 - 11 , changes to text and formatting were incorporated throughout the document revision c (november 2014) this revision incorporates the following updates: sections: - added note in section 5.2 rtsp operation - updated section 5.4 error correcting code (ecc) - deleted 44-terminal very thin leadless array package (tl) - 6x6x0.9 mm body with exposed pad (vtla). registers - updated register 7-6 figures: - updated figure 4-1 , figure 4-3 , figure 4-4 tables: - updated table 27-2 , table 31-13 , table 31-14 , table 31-15 - added table 31-16 , table 31-17 revision d (april 2015) this revision incorporates the following updates: sections: - updated the clock management, timers/ output compare/input capture, communica- tion interfaces and input/output sections at the beginning of the data sheet ( page 1 and page 2 ). - updated all pin diagrams at the beginning of the data sheet ( page 4 through page 9 ). - added section 11.6 high-voltage detect (hvd) - updated section 13.0 timer2/3 and timer4/5 - corrects all buffer heading numbers in section 22.4 can message buffers registers - updated register 3-2 , register 25-2 , register 26-2 figures - updated figure 26-1 , figure 30-5 , figure 30-32 tables - updated table 1 , table 4-25 , table 30-10 , table 30-21 , table 30-52 and table 31-8 changes to text and formatting were incorporated throughout the document downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 436 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 437 dspic33evxxxgm00x/10x family index a absolute maximum ratings .............................................. 341 ac characteristics ............................................................ 351 10-bit adc conversion requirements ..................... 401 12-bit adc conversion requirements ..................... 399 12cx bus data requirements (master mode) .......... 388 adc module.............................................................. 395 adc module (10-bit mode)....................................... 397 adc module (12-bit mode)....................................... 396 canx i/o requirements ........................................... 391 capacitive loading requirements on output pins ....................................................... 351 dma module requirements...................................... 401 external clock requirements ................................... 352 high temperature ..................................................... 408 adc module (10-bit mode)............................... 412 adc module (12-bit mode)............................... 411 internal frc accuracy...................................... 409 internal lprc accuracy ................................... 409 pll clock ......................................................... 409 high-speed pwmx requirements ............................ 361 i/o requirements............................................. ......... 354 i2cx bus data requirements (slave mode) ............. 390 input capture x (icx) requirements ......................... 359 internal frc accuracy.............................................. 353 internal lprc accuracy............................................ 353 load conditions ............................................... . 351, 408 ocx/pwmx mode requirements.............................. 360 op amp/comparator x voltage reference settling time ..................................................... 393 output compare x (ocx) requirements................... 360 pll clock.................................................................. 353 reset, watchdog timer, oscillator start-up timer and power-up timer requirements .................. 356 spi1 master mode (full-duplex, cke = 0, ckp = x, smp = 1) requirements .................... 378 spi1 master mode (full-duplex, cke = 1, ckp = x, smp = 1) ........................................... 376 spi1 master mode (half-duplex, transmit only) requirements ........................... 375 spi1 slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) requirements .................... 386 spi1 slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) requirements .................... 384 spi1 slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) requirements .................... 380 spi1 slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) requirements .................... 382 spi2 master mode (full-duplex, cke = 0, ckp = x, smp = 1) requirements .................... 365 spi2 master mode (full-duplex, cke = 1, ckp = x, smp = 1) requirements .................... 364 spi2 master mode (half-duplex, transmit only) requirements ........................... 363 spi2 slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) requirements .................... 373 spi2 slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) requirements .................... 371 spi2 slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) requirements .................... 367 spi2 slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) requirements .................... 369 timer1 external clock requirements ....................... 357 timer2 and timer4 (type b) external clock requirements ......................................... 358 timer3 and timer5 (type c) external clock requirements ......................................... 358 uartx i/o requirements......................................... 391 adc 10-bit configuration.................................................. 285 12-bit configuration.................................................. 285 control registers...................................................... 289 helpful tips............................................................... 288 key features ............................................................ 285 alternate interrupt vector table (aivt) .............................. 95 analog-to-digital converter. see adc. assemblers mpasm assembler .................................................. 33 8 mplab assembler, linker, librarian........................ 338 b bit-reversed addressing example...................................................................... 78 implementation ......................................................... .. 77 sequence table (16-entry) ........................................ 78 block diagrams 16-bit timer1 module .......................................... ..... 173 accessing program memory with table instructions ............................................... 81 adcx conversion clock period................................ 287 adcx with connection options for anx pins and op amps ............................................... .... 286 addressing for table registers .................................. 8 3 arbiter architecture ................................................ ..... 73 call stack frame ..................................................... 74 canx module ............................................... ............ 254 comparator voltage reference module ................... 314 connections for on-chip voltage regulator ............ 324 cpu core ................................................................... 22 ctmu module ................................................. ......... 280 data access from program space address generation............................................ 80 deadman timer module ........................................... 181 digital filter interconnect......................................... . 302 dma controller ......................................................... 111 dspic33evxxxgm00x/10x family........................... 13 eds read address generation.................................. 68 eds write address generation.................................. 69 high-speed pwmx architectural overview .............. 201 high-speed pwmx register interconnection ........... 202 i2cx module ............................................. ................ 230 input capture x module ............................................ 189 mclr pin connections ............................................ .. 18 multiplexing remappable output for rpn ................ 149 op amp/comparator x module ................................. 301 oscillator circuit placement ....................................... 19 oscillator system...................................................... 123 output compare x module ....................................... 193 paged data memory space ....................................... 70 peripheral to dma controller.................................... 109 pll module .............................................................. 124 recommended minimum connection ........................ 18 remappable input for u1rx .................................... 146 reset system ............................................................. 92 sentx module ............................................... .......... 238 shared i/o port structure ........................................ . 143 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 438 ? 2013-2015 microchip technology inc. spix module............................................. ................. 222 type b timer (timer2 and timer4)........................... 176 type b/type c timer pair (32-bit timer).................. 177 type c timer (timer3 and timer5) .......................... 176 uartx module.......................................................... 247 user-programmable blanking function .................... 302 watchdog timer (wdt) ......................................... ... 325 brown-out reset (bor) .................................................... 324 c c compilers mplab xc ................................................................ 338 can can module control registers ...................................................... 255 message buffers .............................................. ......... 275 word 0 .............................................................. 275 word 1 .............................................................. 275 word 2 .............................................................. 276 word 3 .............................................................. 276 word 4 .............................................................. 277 word 5 .............................................................. 277 word 6 .............................................................. 278 word 7 .............................................................. 278 modes of operation ............................................. ..... 254 overview ................................................................... 253 charge time measurement unit (ctmu) ......................... 279 charge time measurement unit. see ctmu. code examples port write/read ........................................................ 144 porta slew selections ........................................... 145 pwm1 write-protected register unlock sequence.............................................. 200 pwrsav instruction syntax ..................................... 133 code protection ............................................... ......... 317, 326 codeguard security.............................................. .... 317, 326 comparator voltage reference configuring................................................................ 313 control registers ...................................................... 315 configuration bits.............................................................. 317 description ................................................................ 320 controller area network (can)......................................... 253 controller area network. see can. cpu..................................................................................... 21 addressing modes ................................................. ..... 21 arithmetic logic unit (alu)......................................... 30 control registers ........................................................ 25 data space addressing .............................................. 21 dsp engine ................................................................ 30 instruction set ............................................................. 21 programmers model................................................ ... 23 ctmu control registers ...................................................... 281 customer change notification service ............................. 443 customer notification service........................................... 443 customer support ............................................... .............. 443 d data address space ........................................................... 36 alignment .................................................................... 36 memory map for 256-kbyte devices........................... 39 memory map for 32-kbyte devices............................. 37 memory map for 64/128-kbyte devices...................... 38 near data space ........................................................ 36 sfr space.................................................................. 36 width ........................................................................... 36 data space extended x ................................................ ................. 72 memory arbitration, bus master priority ..................... 73 paged memory scheme ........................................... .. 68 dc characteristics............................................................ 342 brown-out reset (bor)........................................... . 349 ctmu current source .............................................. 394 doze current (i doze ) ................................................ 347 filter capacitor (c efc ) specifications ...................... 343 high temperature..................................................... 404 brown-out reset (bor).................................... 407 ctmu current source ...................................... 410 i/o pin input specifications .............................. 406 i/o pin output specifications............................ 407 idle current (i idle ) ............................................ 405 op amp/ comparator ....................................... 411 operating current (i dd ) .................................... 405 operating mips vs. voltage ............................. 404 power-down current (i pd )................................ 405 program memory.............................................. 407 temperature and voltage specifications.......... 404 thermal operating conditions.......................... 404 high-temperature doze current (i doze )........................................ 405 i/o pin input specifications................................... .... 348 i/o pin output specifications.................................... 3 49 idle current (i idle ) .................................................... 345 op amp/comparator x specifications....................... 392 op amp/comparator x voltage reference specifications.................................. 393 operating current (i dd ) ............................................ 344 operating mips vs. voltage ..................................... 342 power-down current (i pd )........................................ 346 program memory ...................................................... 350 temperature and voltage specifications.................. 343 thermal operating conditions.................................. 342 deadman timer (dmt)............................................ ......... 181 control registers ...................................................... 182 deadman timer. see dmt. development support ....................................................... 337 direct memory access. see dma. dma controller channel to peripheral associations.......................... 110 control registers ...................................................... 111 supported peripherals ............................................ .. 109 dmac registers dmaxcnt................................................................. 111 dmaxcon ................................................................ 111 dmaxpad................................................................. 111 dmaxreq ................................................................ 111 dmaxstah/l ........................................................... 111 dmaxstbh/l ........................................................... 111 dmt doze mode ....................................................................... 135 e electrical characteristics ................................... ............... 341 ac..................................................................... 351, 408 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 439 dspic33evxxxgm00x/10x family equations brg formula ............................................................ 229 device operating frequency .................................... 124 f osc calculation....................................................... 124 frame time calculations .......................................... 239 f scl frequency ................................................ ........ 229 f vco calculation....................................................... 124 syncmin and syncmax calculations ................... 240 tick period calculation ............................................. 239 errata .................................................................................. 11 f flash program memory ...................................................... 83 control registers ........................................................ 8 5 error correcting code (ecc)...................................... 85 operations .................................................................. 84 resources................................................................... 85 rtsp operation.......................................................... 84 table instructions........................................................ 83 flexible configuration ....................................................... 317 g getting started with 16-bit dscs........................................ 17 connection requirements .......................................... 17 cpu logic filter capacitor connection (v cap ) .......... 18 decoupling capacitors............................................... . 17 external oscillator pins............................................... 19 icsp pins.................................................................... 19 master clear (mclr ) pin............................................ 18 oscillator value conditions on device start-up .......... 19 unused i/os ................................................................ 19 h high-speed pwm ............................................................. 199 control registers ...................................................... 20 4 faults ........................................................................ 199 resources................................................................. 203 high-temperature electr ical characteristics..................... 403 absolute maximum ratings ...................................... 403 i i/o ports ............................................................................ 143 configuring analog/digital port pins......................... 144 helpful tips ............................................................... 151 high-voltage detect (hvd)....................................... 151 open-drain configuration ......................................... 144 parallel i/o (pio)....................................................... 143 peripheral pin select (pps)...................................... 145 slew rate selection.................................................. 145 write/read timing .......................................... .......... 144 in-circuit debugger ........................................... ................ 326 mplab icd 3............................................................ 339 pickit 3 programmer ................................................ 339 in-circuit emulation........................................................... 317 in-circuit serial programming (icsp) ....................... 317, 326 input capture .............................................. ...................... 189 control registers ...................................................... 19 0 input change notification (icn) ..................................... ... 144 instruction addressing modes......................................... .... 74 file register instructions ............................................ 74 fundamental modes supported.................................. 75 mac instructions......................................................... 75 mcu instructions ........................................................ 74 move and accumulator instructions............................ 75 other instructions........................................................ 75 instruction set overview................................................................... 330 summary .................................................................. 327 symbols used in opcode ......................................... 328 interfacing program and data memory spaces.................. 79 inter-integrated circuit (i 2 c) ............................................. 229 baud rate generator ............................................. .. 229 control registers...................................................... 231 inter-integrated circuit. see i 2 c. internal lprc oscillator use with wdt........................................................... 325 internet address ............................................................... 443 interrupt controller control and status registers.................................... 100 iecx.................................................................. 100 ifsx .................................................................. 100 intcon1.......................................................... 100 intcon2.......................................................... 100 intcon3.......................................................... 100 intcon4.......................................................... 100 inttreg.......................................................... 100 ipcx.................................................................. 100 reset sequence ................................................ ....... 100 interrupt vector table (ivt) ................................................ 95 details................................................................... ...... 98 m memory maps eds ............................................................................ 72 memory organization ............................................ ............. 31 microchip internet web site.............................................. 443 modulo addressing .................................................... ......... 76 applicability................................................................. 77 operation example..................................................... 76 start and end address .............................................. . 76 w address register selection .................................... 76 mplab pm3 device programmer .................................... 339 mplab real ice in-circuit emulator system ................ 339 mplab x integrated development environment software ............................................ .. 337 mplink object linker/mplib object librarian ................ 338 o op amp/comparator......................................................... 301 control registers...................................................... 303 oscillator configuration .................................................... 123 bit values for clock selection .................................. 1 25 cpu clocking system .............................................. 124 output compare ............................................................... 193 control registers...................................................... 194 p packaging ......................................................................... 413 details................................................................... .... 415 marking............................................................. 413 , 414 peripheral module disable (pmd) .................................... 135 peripheral pin select (pps) control registers...................................................... 153 input sources, maps input to function..................... 147 output selection for remappable pins .................... 150 pinout i/o descriptions (table)................................... ......... 14 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 440 ? 2013-2015 microchip technology inc. power-saving features..................................................... 133 clock frequency and switching................................ 133 instruction-based modes .......................................... 133 idle .................................................................... 134 sleep................................................................. 134 interrupts coincident with power save instructions........................................................ 134 program address space ..................................................... 31 construction ................................................................ 79 data access from program memory using table instructions................................................ 81 memory map for dspic33ev128gm00x/10x devices .................. 33 memory map for dspic33ev256gm00x/10x devices .................. 34 memory map for dspic33ev32gm00x/10x devices .................... 31 memory map for dspic33ev64gm00x/10x devices .................... 32 table read instructions tblrdh.............................................................. 81 tblrdl .............................................................. 81 program memory interrupt/trap vectors ................................................. 35 organization.............................................. .................. 35 reset vector ............................................................... 35 programmers model register descriptions.................................................. 23 r referenced sources ........................................................... 12 register maps adc1 .......................................................................... 46 can1 (win (c1ctrl) = 0 or 1) ................................. 47 can1 (win (c1ctrl) = 0)......................................... 47 can1 (win (c1ctrl) = 1)......................................... 48 configuration bytes................................................... 318 cpu core.................................................................... 41 ctmu.......................................................................... 46 dmac ......................................................................... 59 dmt ............................................................................ 52 i2c1 ............................................................................ 44 input capture 1 through input capture 4 .................... 44 interrupt controller ...................................................... 55 nvm ............................................................................ 53 op amp/comparator ................................................... 58 output compare ......................................................... 57 peripheral input remap ............................................. . 52 pmd ............................................................................ 54 porta for dspic33evxxxgmx02 devices.............. 63 porta for dspic33evxxxgmx04 devices.............. 62 porta for dspic33evxxxgmx06 devices.............. 62 portb for dspic33evxxxgmx02 devices.............. 64 portb for dspic33evxxxgmx04 devices.............. 64 portb for dspic33evxxxgmx06 devices.............. 63 portc for dspic33evxxxgmx04 devices ............. 65 portc for dspic33evxxxgmx06 devices ............. 65 portd for dspic33evxxxgmx06 devices ............. 66 porte for dspic33evxxxgmx06 devices.............. 66 portf for dspic33evxxxgmx06 devices .............. 67 portg for dspic33evxxxgmx06 devices ............. 67 pps output for dspic33evxxxgm002/102 devices ............................................................... 50 pps output for dspic33evxxxgm004/104 devices ............................................................... 50 pps output for dspic33evxxxgm006/106 devices............................................................... 51 pwm .................................................................... ....... 60 pwm generator 1............................................. .......... 60 pwm generator 2............................................. .......... 61 pwm generator 3............................................. .......... 61 reference clock ......................................................... 53 sent1 receiver ......................................................... 49 sent2 receiver ......................................................... 49 spi1 and spi2 .............................................. .............. 45 system control ........................................................... 5 3 timers......................................................................... 43 uart1 and uart2 ............................................ ........ 45 registers adxchs0 (adcx input channel 0 select) ............... 296 adxchs123 (adcx input channels 1, 2, 3 select) ................................... 295 adxcon1 (adcx control 1)..................................... 289 adxcon2 (adcx control 2)..................................... 291 adxcon3 (adcx control 3)..................................... 293 adxcon4 (adcx control 4)..................................... 294 adxcssh (adcx input scan select high)............... 298 adxcssl (adcx input scan select low) ................ 300 altdtrx (pwmx alternate dead-time).................. 211 auxconx (pwmx auxiliary control) ....................... 219 chop (pwmx chop clock generator)..................... 207 clkdiv (clock divisor) ............................................ 128 cm4con (comparator 4 control) ............................ 306 cmstat (op amp/comparator status) ................... 303 cmxcon (comparator x control, x = 1, 2, 3 or 5).................................... 304 cmxfltr (comparator x filter control)................... 312 cmxmskcon (comparator x mask gating control) ................................................. 310 cmxmsksrc (comparator x mask source select control) ..................................... 308 corcon (core control) .................................... 27, 102 ctmucon1 (ctmu control 1) ................................ 281 ctmucon2 (ctmu control 2) ................................ 282 ctmuicon (ctmu current control) ....................... 284 ctxtstat (cpu w register context status)........... 29 cvr1con (comparator voltage reference control 1) ........................................ 315 cvr2con (comparator voltage reference control 2) ........................................ 316 cxbufpnt1 (canx filters 0-3 buffer pointer 1) ............................................... 264 cxbufpnt2 (canx filters 4-7 buffer pointer 2) ............................................... 265 cxbufpnt3 (canx filters 8-11 buffer pointer 3) ............................................... 266 cxbufpnt4 (canx filters 12-15 buffer pointer 4) ............................................... 267 cxcfg1 (canx baud rate configuration 1)............ 262 cxcfg2 (canx baud rate configuration 2)............ 263 cxctrl1 (canx control 1)...................................... 255 cxctrl2 (canx control 2)...................................... 256 cxec (canx transmit/receive error count) ........... 262 cxfctrl (canx fifo control) ............................... 258 cxfen1 (canx acceptance filter enable 1) ........... 264 cxfifo (canx fifo status) .................................... 259 cxfmsksel1 (canx filters 7-0 mask selection 1) ............................................. 26 9 cxfmsksel2 (canx filters 15-8 mask selection 2) ............................................. 27 0 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 441 dspic33evxxxgm00x/10x family cxinte (canx interrupt enable) .............................. 261 cxintf (canx interrupt flag) .................................. 260 cxrxfneid (canx acceptance filter n extended identifier).......................................... . 268 cxrxfnsid (canx acceptance filter n standard identifier) ........................................... 268 cxrxful1 (canx receive buffer full 1)................. 272 cxrxful2 (canx receive buffer full 2)................. 272 cxrxmneid (canx acceptance filter mask n extended identifier).......................................... . 271 cxrxmnsid (canx acceptance filter mask n standard identifier) ........................................... 271 cxrxovf1 (canx receive buffer overflow 1)........ 273 cxrxovf2 (canx receive buffer overflow 2)........ 273 cxtrmncon (canx tx/rx buffer mn control) ...... 274 cxvec (canx interrupt code) ................................. 257 devid (device id) .................................................... 323 devrev (device revision) ...................................... 323 dmalca (dma last channel active status) ........... 120 dmapps (dma ping-pong status) .......................... 121 dmapwc (dma peripheral write collision status)................................................ 118 dmarqc (dma request collision status) .............. 119 dmaxcnt (dma channel x transfer count) ........... 116 dmaxcon (dma channel x control) ....................... 112 dmaxpad (dma channel x peripheral address)..... 116 dmaxreq (dma channel x irq select) ................. 113 dmaxstah (dma channel x start address a, high) ...................................... 114 dmaxstal (dma channel x start address a, low)....................................... 114 dmaxstbh (dma channel x start address b, high) ...................................... 115 dmaxstbl (dma channel x start address b, low)....................................... 115 dmtclr (deadman timer clear) ............................ 183 dmtcnth (deadman timer count high) ................ 185 dmtcntl (deadman timer count low) ................. 185 dmtcon (deadman timer control) ........................ 182 dmtholdreg (dmt hold)..................................... 188 dmtpreclr (deadman timer preclear) ................ 182 dmtpscnth (dmt post configure count status high) ...................................................... 186 dmtpscntl (dmt post configure count status low) ....................................................... 186 dmtpsintvh (dmt post configure interval status high) ...................................................... 187 dmtpsintvl (dmt post configure interval status low) ....................................................... 187 dmtstat (deadman timer status)......................... 184 dsadrh (dma most recent ram high address) ................................................... 117 dsadrl (dma most recent ram low address).................................................... 117 dtrx (pwmx dead-time) ........................................ 211 fclconx (pwmx fault current-limit control) ........ 215 i2cxcon1 (i2cx control 1) ...................................... 231 i2cxcon2 (i2cx control 2) ...................................... 233 i2cxmsk (i2cx slave mode address mask) ............ 235 i2cxstat (i2cx status) ........................................... 234 icxcon1 (input capture x control 1) ....................... 190 icxcon2 (input capture x control 2) ....................... 191 intcon1 (interrupt control 1).................................. 103 intcon2 (interrupt control 2).................................. 105 intcon3 (interrupt control 3).................................. 106 intcon4 (interrupt control 4) ................................. 107 inttreg (interrupt control and status) .................. 108 ioconx (pwmx i/o control).................................... 213 lebconx (pwmx leading-edge blanking control) .............................................. 2 17 lebdlyx (pwmx leading-edge blanking delay) ................................................ 218 mdc (pwmx master duty cycle) ............................. 207 nvmadr (nvm lower address)................................ 88 nvmadru (nvm upper address) ............................. 88 nvmcon (nvm control)........................................... . 86 nvmkey (nvm key).................................................. 89 nvmsrcadrh (nvm data memory upper address) ................................................. . 90 nvmsrcadrl (nvm data memory lower address) .................................................. 90 ocxcon1 (output compare x control 1) ................ 194 ocxcon2 (output compare x control 2) ................ 196 osccon (oscillator control)................................... 1 26 osctun (frc oscillator tuning)............................ 131 pdcx (pwmx generator duty cycle)....................... 210 phasex (pwmx primary phase-shift)..................... 210 pllfbd (pll feedback divisor) ............................. 130 pmd1 (peripheral module disable control 1) .......... 136 pmd2 (peripheral module disable control 2) .......... 137 pmd3 (peripheral module disable control 3) .......... 138 pmd4 (peripheral module disable control 4) .......... 138 pmd6 (peripheral module disable control 6) .......... 139 pmd7 (peripheral module disable control 7) .......... 140 pmd8 (peripheral module disable control 8) .......... 141 ptcon (pwmx time base control) ........................ 204 ptcon2 (pwmx primary master clock divider select) .................................................. 2 05 ptper (pwmx primary master time base period)............................................ 20 6 pwmconx (pwmx control) .................................... 208 rcon (reset control)................................................ 93 refocon (reference oscillator control) ............... 132 rpinr0 (peripheral pin select input 0) ................... 153 rpinr1 (peripheral pin select input 1) ................... 153 rpinr11 (peripheral pin select input 11) ............... 157 rpinr12 (peripheral pin select input 12) ............... 158 rpinr18 (peripheral pin select input 18) ............... 159 rpinr19 (peripheral pin select input 19) ............... 159 rpinr22 (peripheral pin select input 22) ............... 160 rpinr23 (peripheral pin select input 23) ............... 161 rpinr26 (peripheral pin select input 26) ............... 161 rpinr3 (peripheral pin select input 3) ................... 154 rpinr37 (peripheral pin select input 37) ............... 162 rpinr38 (peripheral pin select input 38) ............... 162 rpinr39 (peripheral pin select input 39) ............... 163 rpinr44 (peripheral pin select input 44) ............... 164 rpinr45 (peripheral pin select input 45) ............... 164 rpinr7 (peripheral pin select input 7) ................... 155 rpinr8 (peripheral pin select input 8) ................... 156 rpor0 (peripheral pin select output 0) ................. 165 rpor1 (peripheral pin select output 1) ................. 165 rpor10 (peripheral pin select output 10) ............. 170 rpor11 (peripheral pin select output 11) ............. 170 rpor12 (peripheral pin select output 12) ............. 171 rpor13 (peripheral pin select output 13) ............. 171 rpor2 (peripheral pin select output 2) ................. 166 rpor3 (peripheral pin select output 3) ................. 166 rpor4 (peripheral pin select output 4) ................. 167 rpor5 (peripheral pin select output 5) ................. 167 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 442 ? 2013-2015 microchip technology inc. rpor6 (peripheral pin select output 6) .................. 168 rpor7 (peripheral pin select output 7) .................. 168 rpor8 (peripheral pin select output 8) .................. 169 rpor9 (peripheral pin select output 9) .................. 169 sentxcon1 (sentx control 1) .............................. 241 sentxdath (sentx receive data high) ............... 245 sentxdatl (sentx receive data low) ................ 245 sentxstat (sentx status) ................................... 243 sevtcmp (pwmx primary special event compare) ................................... 206 spixcon1 (spix control 1)...................................... 226 spixcon2 (spix control 2)...................................... 228 spixstat (spix status and control) ....................... 224 sr (cpu status) ............................................. 25, 101 t1con (timer1 control)........................................... 174 trgconx (pwmx trigger control).......................... 212 trigx (pwmx primary trigger compare value) ...... 214 txcon (timer2 and timer4 control)........................ 178 tycon (timer3 and timer5 control)........................ 179 uxmode (uartx mode) .......................................... 249 uxsta (uartx status and control) ......................... 251 resets ................................................................................. 91 brown-out reset (bor) .............................................. 91 configuration mismatch reset (cm)........................... 91 illegal condition reset (iopuwr) .............................. 91 illegal address mode .......................................... 91 illegal opcode .............................................. ....... 91 security ............................................................... 91 uninitialized w register...................................... 91 master clear pin reset (mclr ) ................................. 91 master reset signal (sysrst ).................................. 91 power-on reset (por) ............................................... 91 reset instruction (swr)........................................... 91 trap conflict reset (trapr)...................................... 91 watchdog timer time-out reset (wdto).................. 91 revision history ................................................................ 4 35 s sent sentx protocol data frames........................................... 23 8 serial peripheral interface (spi) ....................................... 221 serial peripheral interface. see spi. single-edge nibble transmission (sent) ........................ 237 receive mode ........................................................... 240 transmit mode .......................................................... 239 single-edge nibble transmission for automotive applications............................................ 237 single-edge nibble transmission. see sent. software simulator mplab x sim ........................................................... 339 software stack pointer (ssp) ............................................. 74 special features of the cpu............................................. 317 spi control registers ...................................................... 224 helpful tips ............................................................... 223 t temperature and voltage specifications ac ............................................................................. 351 high temperature ac ..................................................................... 408 thermal packaging characteristics .................................. 342 third-party development tools ........................................ 3 40 timer1 ............................................................................... 173 control register ........................................................ 174 timer2/3 and timer4/5 ...................................... ............... 175 control registers ...................................................... 178 timing diagrams 10-bit adc conversion (chps<1:0> = 01, simsam = 0, asam = 0, ssrc<2:0> = 000, ssrcg = 0) .... 400 10-bit adc conversion (chps<1:0> = 01, simsam = 0, asam = 1, ssrc<2:0> = 111, ssrcg = 0, samc<4:0> = 00010).................. 400 12-bit adc conversion (asam = 0, ssrc<2:0> = 000, ssrcg = 0) ...................... 398 bor and master clear reset ................................... 354 canx i/o .................................................................. 391 external clock........................................................... 352 high-speed pwmx characteristics .......................... 361 high-speed pwmx fault .......................................... 361 i/o characteristics .................................................... 354 i2cx bus data (master mode) .................................. 387 i2cx bus data (slave mode) .................................. .. 389 i2cx bus start/stop bits (master mode)................... 387 i2cx bus start/stop bits (slave mode)..................... 389 input capture x (icx) ................................................ 359 ocx/pwmx characteristics ...................................... 360 output compare x (ocx) characteristics ................. 360 power-on reset characteristics ............................... 35 5 spi1 master mode (full-duplex, cke = 0, ckp = x, smp = 1) ........................................... 377 spi1 master mode (full-duplex, cke = 1, ckp = x, smp = 1) ........................................... 376 spi1 master mode (half-duplex, transmit only, cke = 0)................................... 374 spi1 master mode (half-duplex, transmit only, cke = 1)................................... 375 spi1 slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) ........................................... 385 spi1 slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) ........................................... 383 spi1 slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) ........................................... 379 spi1 slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) ........................................... 381 spi2 master mode (full-duplex, cke = 0, ckp = x, smp = 1) ........................................... 365 spi2 master mode (full-duplex, cke = 1, ckp = x, smp = 1) ........................................... 364 spi2 master mode (half-duplex, transmit only, cke = 0)................................... 362 spi2 master mode (half-duplex, transmit only, cke = 1)................................... 363 spi2 slave mode (full-duplex, cke = 0, ckp = 0, smp = 0) ........................................... 372 spi2 slave mode (full-duplex, cke = 0, ckp = 1, smp = 0) ........................................... 370 spi2 slave mode (full-duplex, cke = 1, ckp = 0, smp = 0) ........................................... 366 spi2 slave mode (full-duplex, cke = 1, ckp = 1, smp = 0) ........................................... 368 timer1-timer5 external clock .................................. 357 uartx i/o ................................................................ 391 downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 443 dspic33evxxxgm00x/10x family u uart control registers ...................................................... 24 9 helpful tips ............................................................... 248 universal asynchronous receiver transmitter (uart)................................................... 247 universal asynchronous receiver transmitter. see uart. user otp memory ............................................................ 324 v voltage regulator (on-chip) .......................................... .. 324 w watchdog timer (wdt)............................................ 317, 325 programming considerations ................................... 325 www address ................................................................. 443 www, on-line support ................... .................................. 11 downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 444 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 445 dspic33evxxxgm00x/10x family the microchip web site microchip provides online support via our www site at www.microchip.com . this web site is used as a means to make files and information easily available to customers. accessible by using your favorite internet browser, the web site contains the following information: product support C data sheets and errata, application notes and sample programs, design resources, users guides and hardware support documents, latest software releases and archived software general technical support C frequently asked questions (faq), technical support requests, online discussion groups, microchip consultant program member listing business of microchip C product selector and ordering guides, latest microchip press releases, listing of seminars and events, listings of microchip sales offices, distributors and factory representatives customer change notification service microchips customer notification service helps keep customers current on microchip products. subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. to register, access the microchip web site at www.microchip.com . under support, click on customer change notification and follow the registration instructions. customer support users of microchip products can receive assistance through several channels: distributor or representative local sales office field application engineer (fae) technical support customers should contact their distributor, representative or field application engineer (fae) for support. local sales offices are also available to help customers. a listing of sales offices and locations is included in the back of this document. technical support is available through the web site at: http://microchip.com/support downloaded from: http:///
dspic33evxxxgm00x/10x ds70005144d-page 446 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 447 dspic33evxxxgm00x/10x family product identification system to order or obtain information, e.g., on pricing or de livery, refer to the factory or the listed sales office . architecture: 33 = 16-bit digital signal controller family: ev = enhanced voltage product group: gm = general purpose plus motor control family pin count: 02 = 28-pin 04 = 44-pin 06 = 64-pin temperature range i = -40c to +85c (industrial) e = -40c to +125c (extended) h = -40c to +150c (high) package: mm = plastic quad flat, no lead package C (28-pin) 6x6x0.9 mm body (qfn-s) so = plastic small outline C (28-pin) 7.50 mm body (soic) sp = skinny plastic dual in-line C (28-pin) 300 mil body (spdip) ml = plastic quad flat, no lead package C (44-pin) 8x8 mm body (qfn) mr = plastic quad flat, no lead package C (64-pin) 9x9x0.9 mm body (qfn) pt = plastic thin quad flatpack C (44-pin) 10x10x1 mm body (tqfp) pt = plastic thin quad flatpack C (64-pin) 10x10x1 mm body (tqfp) example: dspic33ev256gm006-i/pt: dspic33, enhanced voltage, 256-kbyte program memory, 64-pin, industrial temperature, tqfp package. microchip trademark architecture core family program memory size (kbytes) product group pin count package pattern dspic 33 e v xxx gm 0 0x t p t - xxx tape and reel flag (if applicable) downloaded from: http:///
dspic33evxxxgm00x/10x family ds70005144d-page 448 ? 2013-2015 microchip technology inc. notes: downloaded from: http:///
? 2013-2015 microchip technology inc. ds70005144d-page 449 information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application meets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safety applications is entirely at the buyers risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting from such use. no licenses are conveyed, implicitly or otherwise, under any microchip intellectual property rights. trademarks the microchip name and logo, the microchip logo, dspic, flashflex, flexpwr, jukeblox, k ee l oq , k ee l oq logo, kleer, lancheck, medialb, most, most logo, mplab, optolyzer, pic, picstart, pic 32 logo, righttouch, spynic, sst, sst logo, superflash and uni/o are registered trademarks of microchip tec hnology incorporated in the u.s.a. and other countries. the embedded control solutions company and mtouch are registered trademarks of microchip technology incorporated in the u.s.a. analog-for-the-digital age, bodycom, chipkit, chipkit logo, codeguard, dspicdem, dspicdem.net, ecan, in-circuit serial programming, icsp, inter-chip connectivity, kleernet, kleernet logo, miwi, mpasm, mpf, mplab certified logo, mplib, mplink, multitrak, netdetach, omniscient code generation, picdem, picdem.net, pickit, pictail, righttouch logo, real ice, sqi, serial quad i/o, total endurance, tsharc, usbcheck, varisense, viewspan, wiperlock, wireless dna, and zena are trademarks of microchip technology incorporated in the u.s.a. and other countries. sqtp is a service mark of microchip technology incorporated in the u.s.a. silicon storage technology is a registered trademark of microchip technology inc. in other countries. gestic is a registered trademar ks of microchip technology germany ii gmbh & co. kg, a subsidiary of microchip technology inc., in other countries. all other trademarks mentioned herein are property of their respective companies. ? 2013-2015, microchip technology incorporated, printed in the u.s.a., all rights reserved. isbn: 978-1-63277-251-0 note the following details of the code protection feature on microchip devices: microchip products meet the specification cont ained in their particular microchip data sheet. microchip believes that its family of products is one of the most secure families of its kind on the market today, when used i n the intended manner and under normal conditions. there are dishonest and possibly illegal methods used to breach the code protection feature. all of these methods, to our knowledge, require using the microchip products in a manner outside the operating specif ications contained in microchips data sheets. most likely, the person doing so is engaged in theft of intellectual property. microchip is willing to work with the customer who is concerned about the integrity of their code. neither microchip nor any other semiconduc tor manufacturer can guarantee the security of their code. code protection does not mean that we are guaranteeing the product as unbreakable. code protection is constantly evolving. we at microchip are co mmitted to continuously improvin g the code protection features of our products. attempts to break microchips code protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the companys quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microperipherals, nonvolatile memory an d analog products. in addition, microchips quality system for the design and manufacture of development systems is iso 9001:2000 certified. quality management s ystem certified by dnv == iso/ts 16949 == downloaded from: http:///
ds70005144d-page 450 ? 2013-2015 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://www.microchip.com/ support web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 austin, tx tel: 512-257-3370 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 cleveland independence, oh tel: 216-447-0464 fax: 216-447-0643 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit novi, mi tel: 248-848-4000 houston, tx tel: 281-894-5983 indianapolis noblesville, in tel: 317-773-8323 fax: 317-773-5453 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 new york, ny tel: 631-435-6000 san jose, ca tel: 408-735-9110 canada - toronto tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2943-5100 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8569-7000 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - chongqing tel: 86-23-8980-9588 fax: 86-23-8980-9500 china - dongguan tel: 86-769-8702-9880 china - hangzhou tel: 86-571-8792-8115 fax: 86-571-8792-8116 china - hong kong sar tel: 852-2943-5100 fax: 852-2401-3431 china - nanjing tel: 86-25-8473-2460 fax: 86-25-8473-2470 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8864-2200 fax: 86-755-8203-1760 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 asia/pacific china - xiamen tel: 86-592-2388138 fax: 86-592-2388130 china - zhuhai tel: 86-756-3210040 fax: 86-756-3210049 india - bangalore tel: 91-80-3090-4444 fax: 91-80-3090-4123 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-3019-1500 japan - osaka tel: 81-6-6152-7160 fax: 81-6-6152-9310 japan - tokyo tel: 81-3-6880- 3770 fax: 81-3-6880-3771 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - kuala lumpur tel: 60-3-6201-9857 fax: 60-3-6201-9859 malaysia - penang tel: 60-4-227-8870 fax: 60-4-227-4068 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-5778-366 fax: 886-3-5770-955 taiwan - kaohsiung tel: 886-7-213-7828 taiwan - taipei tel: 886-2-2508-8600 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - dusseldorf tel: 49-2129-3766400 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 germany - pforzheim tel: 49-7231-424750 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 italy - venice tel: 39-049-7625286 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 poland - warsaw tel: 48-22-3325737 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 sweden - stockholm tel: 46-8-5090-4654 uk - wokingham tel: 44-118-921-5800 fax: 44-118-921-5820 worldwide sales and service 01/27/15 downloaded from: http:///


▲Up To Search▲   

 
Price & Availability of DSPIC33EV128GM002-ESO

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X